summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/default.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-09-27 15:19:59 +0200
committertv <tv@shackspace.de>2015-09-27 15:19:59 +0200
commit53f93de02f412005e33fadc50dccde1a6400abe8 (patch)
tree97eadd14882cf3159e6b2657043507f76c9b15a9 /krebs/3modules/default.nix
parent2d1985e42006c121eac4bd915bee3e436ebcd314 (diff)
krebs: no extraHosts for hosts w/o aliases
Diffstat (limited to 'krebs/3modules/default.nix')
-rw-r--r--krebs/3modules/default.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index 5fb129747..78834d8d5 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -84,13 +84,16 @@ let
mapAttrsToList (hostname: host:
mapAttrsToList (netname: net:
let
- aliases = toString (unique (longs ++ shorts));
+ aliases = longs ++ shorts;
providers = dns.split-by-provider net.aliases cfg.dns.providers;
longs = providers.hosts;
- shorts = map (removeSuffix ".${cfg.search-domain}") longs;
+ shorts =
+ map (removeSuffix ".${cfg.search-domain}")
+ (filter (hasSuffix ".${cfg.search-domain}")
+ longs);
in
- map (addr: "${addr} ${aliases}") net.addrs
- ) host.nets
+ map (addr: "${addr} ${toString aliases}") net.addrs
+ ) (filterAttrs (name: host: host.aliases != []) host.nets)
) cfg.hosts
));