summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/3modules/default.nix4
1 files changed, 3 insertions, 1 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
));