mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 09:44:18 +00:00
nixos/networking: filter out empty entries
This commit is contained in:
parent
ad13d64afd
commit
4a405d8995
@ -233,7 +233,7 @@ in
|
|||||||
oneToString = set: ip: ip + " " + concatStringsSep " " set.${ip};
|
oneToString = set: ip: ip + " " + concatStringsSep " " set.${ip};
|
||||||
allToString = set: concatMapStringsSep "\n" (oneToString set) (attrNames set);
|
allToString = set: concatMapStringsSep "\n" (oneToString set) (attrNames set);
|
||||||
in ''
|
in ''
|
||||||
${allToString cfg.hosts}
|
${allToString (filterAttrs (_: v: v != []) cfg.hosts)}
|
||||||
${cfg.extraHosts}
|
${cfg.extraHosts}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user