From 4a405d899508c0161b4e34c1f94aeb59f0d319a4 Mon Sep 17 00:00:00 2001 From: edef Date: Sun, 7 Jul 2019 00:46:28 +0000 Subject: [PATCH] nixos/networking: filter out empty entries --- nixos/modules/config/networking.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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} '';