nixos-module/network: configure addresses for all net interfaces

This commit is contained in:
Astro 2021-11-18 21:36:57 +01:00
parent ba6948cec7
commit 14ddaeba45
1 changed files with 2 additions and 2 deletions

View File

@ -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