diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2017-12-03 05:13:14 +0100 |
---|---|---|
committer | rnhmjoj <rnhmjoj@inventati.org> | 2018-02-17 14:01:24 +0100 |
commit | c1bed05e341756f7fdfa73035c7f1e078e49be3d (patch) | |
tree | 462f47865c4ff0949484d0aaa2e3845d0eb2ddc7 /nixos/modules/tasks/network-interfaces-scripted.nix | |
parent | f41111c4da9a7eb5cade95d945eec7576757d27d (diff) |
nixos/networking-interfaces: rename IP addresses/routes options
Diffstat (limited to 'nixos/modules/tasks/network-interfaces-scripted.nix')
-rw-r--r-- | nixos/modules/tasks/network-interfaces-scripted.nix | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index 28bbc27a2693..66732ce7732e 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -20,14 +20,8 @@ let "sys-subsystem-net-devices-${escapeSystemdPath interface}.device"; interfaceIps = i: - i.ip4 ++ optionals cfg.enableIPv6 i.ip6 - ++ optional (i.ipAddress != null) { - address = i.ipAddress; - prefixLength = i.prefixLength; - } ++ optional (cfg.enableIPv6 && i.ipv6Address != null) { - address = i.ipv6Address; - prefixLength = i.ipv6PrefixLength; - }; + i.ipv4.addresses + ++ optionals cfg.enableIPv6 i.ipv6.addresses; destroyBond = i: '' while true; do @@ -207,7 +201,7 @@ let state="/run/nixos/network/routes/${i.name}" mkdir -p $(dirname "$state") - ${flip concatMapStrings (i.ipv4Routes ++ i.ipv6Routes) (route: + ${flip concatMapStrings (i.ipv4.routes ++ i.ipv6.routes) (route: let cidr = "${route.address}/${toString route.prefixLength}"; via = optionalString (route.via != null) ''via "${route.via}"''; |