diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/default.nix | 4 | ||||
-rw-r--r-- | krebs/3modules/tv/default.nix | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index e6ad449fa..82ede952d 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -130,7 +130,9 @@ let shorts = let s = ".${cfg.search-domain}"; in map (removeSuffix s) (filter (hasSuffix s) longs); in - map (addr: "${addr} ${toString aliases}") net.addrs + optionals + (aliases != []) + (map (addr: "${addr} ${toString aliases}") net.addrs) ) (filterAttrs (name: host: host.aliases != []) host.nets) ) cfg.hosts )); diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix index ca8e577d8..8e266e1b3 100644 --- a/krebs/3modules/tv/default.nix +++ b/krebs/3modules/tv/default.nix @@ -78,11 +78,7 @@ with import <stockholm/lib>; extraZones = { # TODO generate krebsco.de zone from nets and don't use extraZones at all "krebsco.de" = '' - krebsco.de. 60 IN MX 5 mx23 - mx23 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr} cd 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr} - cgit 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr} - cgit.cd 60 IN A ${config.krebs.hosts.cd.nets.internet.ip4.addr} ''; }; nets = { @@ -90,11 +86,7 @@ with import <stockholm/lib>; ip4.addr = "45.62.237.203"; aliases = [ "cd.i" - "cd.internet" "cd.krebsco.de" - "cgit.cd.krebsco.de" - "cd.viljetic.de" - "cgit.cd.viljetic.de" ]; ssh.port = 11423; }; @@ -221,7 +213,9 @@ with import <stockholm/lib>; ni = { extraZones = { "krebsco.de" = '' + krebsco.de. 60 IN MX 5 ni ni 60 IN A ${config.krebs.hosts.ni.nets.internet.ip4.addr} + cgit 60 IN A ${config.krebs.hosts.ni.nets.internet.ip4.addr} cgit.ni 60 IN A ${config.krebs.hosts.ni.nets.internet.ip4.addr} ''; }; |