0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/networkd: accept true and false in addition to "yes" and "no" for DHCP= and LinkLocalAddressing=

These were the only two systemd configuration values that were missing the `boolValues ++` treatment, according to my `rg` through the codebase.
This commit is contained in:
Philip Taron 2024-02-27 08:53:32 -08:00
parent b9652c73ed
commit 27d6c242ea
No known key found for this signature in database

View file

@ -647,9 +647,9 @@ let
"BatmanAdvanced" "BatmanAdvanced"
]) ])
# Note: For DHCP the values both, none, v4, v6 are deprecated # 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 "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 "IPv6LinkLocalAddressGenerationMode" ["eui64" "none" "stable-privacy" "random"])
(assertValueOneOf "IPv4LLRoute" boolValues) (assertValueOneOf "IPv4LLRoute" boolValues)
(assertValueOneOf "DefaultRouteOnDevice" boolValues) (assertValueOneOf "DefaultRouteOnDevice" boolValues)