about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRaito Bezarius <masterancpp@gmail.com>2023-07-04 01:53:34 +0200
committerRaito Bezarius <masterancpp@gmail.com>2023-07-04 01:53:34 +0200
commitfaba775beb2f009e6d9fe5bf0861310b569d7ba1 (patch)
treedaf427eeff4db7e7c77aea8924fb03c84cf2a75d
parent9cf56143a3078dc2e933b9df48372e721693c3c2 (diff)
downloadnixlib-faba775beb2f009e6d9fe5bf0861310b569d7ba1.tar
nixlib-faba775beb2f009e6d9fe5bf0861310b569d7ba1.tar.gz
nixlib-faba775beb2f009e6d9fe5bf0861310b569d7ba1.tar.bz2
nixlib-faba775beb2f009e6d9fe5bf0861310b569d7ba1.tar.lz
nixlib-faba775beb2f009e6d9fe5bf0861310b569d7ba1.tar.xz
nixlib-faba775beb2f009e6d9fe5bf0861310b569d7ba1.tar.zst
nixlib-faba775beb2f009e6d9fe5bf0861310b569d7ba1.zip
nixos/networkd: support `Independent` flag for VXLAN netdevs
According to networkd netdev's manpage:
```
       Independent=
           Takes a boolean. When true, the vxlan interface is created without any underlying network interface. Defaults to false, which means that a .network
           file that requests this VXLAN interface using VXLAN= is required for the VXLAN to be created.
```

is a valid option for [VXLAN] section.
-rw-r--r--nixos/modules/system/boot/networkd.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index a7183daf5e0a..d5c17f7a1bb0 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -222,6 +222,7 @@ let
           "PortRange"
           "FlowLabel"
           "IPDoNotFragment"
+          "Independent"
         ])
         (assertInt "VNI")
         (assertRange "VNI" 1 16777215)
@@ -241,6 +242,7 @@ let
         (assertInt "FlowLabel")
         (assertRange "FlowLabel" 0 1048575)
         (assertValueOneOf "IPDoNotFragment" (boolValues + ["inherit"]))
+        (assertValueOneOf "Independent" boolValues)
       ];
 
       sectionTunnel = checkUnitConfig "Tunnel" [