From 14ddaeba454118e19bde5edb92ac61a546f571ea Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 18 Nov 2021 21:36:57 +0100 Subject: [PATCH] nixos-module/network: configure addresses for all net interfaces --- nix/nixos-module/network.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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