nixos/networking: filter out empty entries

This commit is contained in:
edef 2019-07-07 00:46:28 +00:00
parent ad13d64afd
commit 4a405d8995

View file

@ -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}
'';