forked from zentralwerk/network
nixos-module/network: configure addresses for all net interfaces
This commit is contained in:
parent
ba6948cec7
commit
14ddaeba45
|
@ -29,7 +29,7 @@ in
|
||||||
builtins.mapAttrs (ifName: { gw4, gw6, ... }:
|
builtins.mapAttrs (ifName: { gw4, gw6, ... }:
|
||||||
let
|
let
|
||||||
netConfig = config.site.net.${ifName};
|
netConfig = config.site.net.${ifName};
|
||||||
in rec {
|
in lib.mkIf (config.site.net ? ${ifName}) rec {
|
||||||
matchConfig.Name = ifName;
|
matchConfig.Name = ifName;
|
||||||
|
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
|
@ -57,7 +57,7 @@ in
|
||||||
optional (gw4 != null) config.site.net.${ifName}.hosts4.${gw4} ++
|
optional (gw4 != null) config.site.net.${ifName}.hosts4.${gw4} ++
|
||||||
optional (gw6 != null) (findGw6 ifName gw6);
|
optional (gw6 != null) (findGw6 ifName gw6);
|
||||||
|
|
||||||
}) config.site.hosts.${hostName}.physicalInterfaces;
|
}) config.site.hosts.${hostName}.interfaces;
|
||||||
};
|
};
|
||||||
|
|
||||||
# DNS settings
|
# DNS settings
|
||||||
|
|
Loading…
Reference in New Issue