krebs: no extraHosts for hosts w/o aliases
This commit is contained in:
parent
2d1985e420
commit
53f93de02f
@ -84,13 +84,16 @@ let
|
|||||||
mapAttrsToList (hostname: host:
|
mapAttrsToList (hostname: host:
|
||||||
mapAttrsToList (netname: net:
|
mapAttrsToList (netname: net:
|
||||||
let
|
let
|
||||||
aliases = toString (unique (longs ++ shorts));
|
aliases = longs ++ shorts;
|
||||||
providers = dns.split-by-provider net.aliases cfg.dns.providers;
|
providers = dns.split-by-provider net.aliases cfg.dns.providers;
|
||||||
longs = providers.hosts;
|
longs = providers.hosts;
|
||||||
shorts = map (removeSuffix ".${cfg.search-domain}") longs;
|
shorts =
|
||||||
|
map (removeSuffix ".${cfg.search-domain}")
|
||||||
|
(filter (hasSuffix ".${cfg.search-domain}")
|
||||||
|
longs);
|
||||||
in
|
in
|
||||||
map (addr: "${addr} ${aliases}") net.addrs
|
map (addr: "${addr} ${toString aliases}") net.addrs
|
||||||
) host.nets
|
) (filterAttrs (name: host: host.aliases != []) host.nets)
|
||||||
) cfg.hosts
|
) cfg.hosts
|
||||||
));
|
));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user