about summary refs log tree commit diff
path: root/nixos/modules/system/boot
diff options
context:
space:
mode:
authorChristian Albrecht <christian.albrecht@mayflower.de>2015-12-23 06:02:59 +0100
committerChristian Albrecht <christian.albrecht@mayflower.de>2015-12-23 06:02:59 +0100
commit2307d2454481d26e22a02456a8e988c7b1196a27 (patch)
tree8cb32817cf6871d305c22b1c7552adaa94ee84aa /nixos/modules/system/boot
parent5b10c116169666eb3c648e45d577df39cbe5d61d (diff)
downloadnixlib-2307d2454481d26e22a02456a8e988c7b1196a27.tar
nixlib-2307d2454481d26e22a02456a8e988c7b1196a27.tar.gz
nixlib-2307d2454481d26e22a02456a8e988c7b1196a27.tar.bz2
nixlib-2307d2454481d26e22a02456a8e988c7b1196a27.tar.lz
nixlib-2307d2454481d26e22a02456a8e988c7b1196a27.tar.xz
nixlib-2307d2454481d26e22a02456a8e988c7b1196a27.tar.zst
nixlib-2307d2454481d26e22a02456a8e988c7b1196a27.zip
networkd: add IPForward and IPMasquerade options
to Network config section
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r--nixos/modules/system/boot/networkd.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 34eea9af83b1..b9fb4b12e7d2 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -93,11 +93,13 @@ let
 
   checkNetwork = checkUnitConfig "Network" [
     (assertOnlyFields [
-      "Description" "DHCP" "DHCPServer" "IPv4LL" "IPv4LLRoute"
+      "Description" "DHCP" "DHCPServer" "IPForward" "IPMasquerade" "IPv4LL" "IPv4LLRoute"
       "LLMNR" "Domains" "Bridge" "Bond"
     ])
     (assertValueOneOf "DHCP" ["both" "none" "v4" "v6"])
     (assertValueOneOf "DHCPServer" boolValues)
+    (assertValueOneOf "IPForward" ["yes" "no" "ipv4" "ipv6"])
+    (assertValueOneOf "IPMasquerade" boolValues)
     (assertValueOneOf "IPv4LL" boolValues)
     (assertValueOneOf "IPv4LLRoute" boolValues)
     (assertValueOneOf "LLMNR" boolValues)