diff --git a/modules/core/vhost.nix b/modules/core/vhost.nix index 1de5305..ab59695 100644 --- a/modules/core/vhost.nix +++ b/modules/core/vhost.nix @@ -121,10 +121,11 @@ in }) cfg.hosts; - networking.extraHosts = concatMapStringsSep "\n" - (domain: - mkIf cfg.hosts.${domain}.resolveLocally "127.0.0.1 ${domain}" + networking.extraHosts = lib.flatten (lib.mapAttrsToList + (domain: hostConf: + lib.optionals hostConf.resolveLocally "127.0.0.1 ${domain}" ) - (lib.attrNames cfg.hosts); + cfg.hosts + ); }; }