summaryrefslogtreecommitdiffstats
path: root/nixos/modules/config/networking.nix
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2019-07-07 00:46:28 +0000
committeredef <edef@edef.eu>2019-07-07 00:49:40 +0000
commit4a405d899508c0161b4e34c1f94aeb59f0d319a4 (patch)
tree90b724127b2e6ee16d6165d5cf43790bbb0330f3 /nixos/modules/config/networking.nix
parentad13d64afdb2f8fab4d3e0559d18b2fb3cfb8964 (diff)
nixos/networking: filter out empty entries
Diffstat (limited to 'nixos/modules/config/networking.nix')
-rw-r--r--nixos/modules/config/networking.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix
index 8b352dad4727..eab4e73e19a1 100644
--- a/nixos/modules/config/networking.nix
+++ b/nixos/modules/config/networking.nix
@@ -233,7 +233,7 @@ in
oneToString = set: ip: ip + " " + concatStringsSep " " set.${ip};
allToString = set: concatMapStringsSep "\n" (oneToString set) (attrNames set);
in ''
- ${allToString cfg.hosts}
+ ${allToString (filterAttrs (_: v: v != []) cfg.hosts)}
${cfg.extraHosts}
'';