Server/caddy: add downloads page
This commit is contained in:
parent
301a1bfa9b
commit
7006a7ff93
1 changed files with 22 additions and 8 deletions
|
|
@ -4,6 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
manualHostname = "manual.everest.tailscale";
|
||||
downloadsHostname = "dl.everest.tailscale";
|
||||
in {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
|
|
@ -20,16 +21,29 @@ in {
|
|||
bind 100.73.96.48
|
||||
}
|
||||
'';
|
||||
virtualHosts.nixos-manual = {
|
||||
hostName = manualHostname;
|
||||
extraConfig = ''
|
||||
import tailscale
|
||||
file_server
|
||||
root * ${config.system.build.manual.manualHTML}/share/doc/nixos
|
||||
'';
|
||||
virtualHosts = {
|
||||
nixos-manual = {
|
||||
hostName = manualHostname;
|
||||
extraConfig = ''
|
||||
import tailscale
|
||||
file_server
|
||||
root * ${config.system.build.manual.manualHTML}/share/doc/nixos
|
||||
'';
|
||||
};
|
||||
downloads = {
|
||||
hostName = downloadsHostname;
|
||||
extraConfig = ''
|
||||
import tailscale
|
||||
file_server browse
|
||||
root * /srv/dl/
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
services.dnsmasq.settings.cname = ["${manualHostname},everest"];
|
||||
services.dnsmasq.settings.cname = [
|
||||
"${manualHostname},everest"
|
||||
"${downloadsHostname},everest"
|
||||
];
|
||||
systemd = {
|
||||
units.tailscaled.requiredBy = ["caddy.service"];
|
||||
# We have somewhat frequent power outages, and our ISP router takes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue