diff --git a/hosts/2maccabees/dnsmasq.nix b/hosts/2maccabees/dnsmasq.nix index 000d958..4c84e8b 100644 --- a/hosts/2maccabees/dnsmasq.nix +++ b/hosts/2maccabees/dnsmasq.nix @@ -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" diff --git a/modules/proxy.nix b/modules/proxy.nix index c13247f..7e0768f 100644 --- a/modules/proxy.nix +++ b/modules/proxy.nix @@ -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; {