diff --git a/nix/nixos-module/network.nix b/nix/nixos-module/network.nix index 6600826..b49855e 100644 --- a/nix/nixos-module/network.nix +++ b/nix/nixos-module/network.nix @@ -29,7 +29,7 @@ in builtins.mapAttrs (ifName: { gw4, gw6, ... }: let netConfig = config.site.net.${ifName}; - in rec { + in lib.mkIf (config.site.net ? ${ifName}) rec { matchConfig.Name = ifName; networkConfig = { @@ -57,7 +57,7 @@ in optional (gw4 != null) config.site.net.${ifName}.hosts4.${gw4} ++ optional (gw6 != null) (findGw6 ifName gw6); - }) config.site.hosts.${hostName}.physicalInterfaces; + }) config.site.hosts.${hostName}.interfaces; }; # DNS settings