Automatic serverAliases

This commit is contained in:
Greg Hellings
2022-04-29 08:47:52 -05:00
parent 5234eaefb4
commit fecf8d6b41
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ let
extraHosts = builtins.concatStringsSep "\n" [
"10.42.0.1 switch"
"10.42.1.1 router"
"10.42.1.2 dns smart"
"10.42.1.2 dns dns.thehellings.lan smart smart.thehellings.lan"
"100.99.244.92 dns.me.ts"
"10.42.1.3 printer"
"10.42.1.4 chronicles nas"
+3
View File
@@ -3,6 +3,8 @@
let
cfg = config.greg.proxies;
alias = name: with builtins; head (split "\\." name);
makeHost = name: dest: {
forceSSL = dest.ssl;
enableACME = dest.ssl;
@@ -14,6 +16,7 @@ proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
'';
};
serverAliases = [ "${alias name}" ];
};
in with lib; {