krebs: no extraHosts w/o aliases #2

This commit is contained in:
tv 2016-11-11 01:50:59 +01:00
parent a125dad5a8
commit ae73660522

View File

@ -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
));