Merge pull request #291882 from philiptaron/systemd-networkd/boolValuesPlus

nixos/networkd: accept `true` and `false` in addition to "yes" and "no" for DHCP= and LinkLocalAddressing=
This commit is contained in:
Will Fancher 2024-02-27 20:33:08 -05:00 committed by GitHub
commit 031978580c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -647,9 +647,9 @@ let
"BatmanAdvanced"
])
# Note: For DHCP the values both, none, v4, v6 are deprecated
(assertValueOneOf "DHCP" ["yes" "no" "ipv4" "ipv6"])
(assertValueOneOf "DHCP" (boolValues ++ ["ipv4" "ipv6"]))
(assertValueOneOf "DHCPServer" boolValues)
(assertValueOneOf "LinkLocalAddressing" ["yes" "no" "ipv4" "ipv6" "fallback" "ipv4-fallback"])
(assertValueOneOf "LinkLocalAddressing" (boolValues ++ ["ipv4" "ipv6" "fallback" "ipv4-fallback"]))
(assertValueOneOf "IPv6LinkLocalAddressGenerationMode" ["eui64" "none" "stable-privacy" "random"])
(assertValueOneOf "IPv4LLRoute" boolValues)
(assertValueOneOf "DefaultRouteOnDevice" boolValues)