nixos/systemd/networkd: Add missing network section options

This commit is contained in:
Jack O'Sullivan 2024-03-18 16:25:10 +00:00
parent fa42b5a5f4
commit 798b11de8e

View File

@ -230,6 +230,7 @@ let
sectionVLAN = checkUnitConfig "VLAN" [
(assertOnlyFields [
"Id"
"Protocol"
"GVRP"
"MVRP"
"LooseBinding"
@ -237,6 +238,7 @@ let
])
(assertInt "Id")
(assertRange "Id" 0 4094)
(assertValueOneOf "Protocol" ["802.1q" "802.1ad"])
(assertValueOneOf "GVRP" boolValues)
(assertValueOneOf "MVRP" boolValues)
(assertValueOneOf "LooseBinding" boolValues)
@ -700,6 +702,9 @@ let
"Xfrm"
"KeepConfiguration"
"BatmanAdvanced"
"IPoIB"
"L2TP"
"MACVTAP"
])
# Note: For DHCP the values both, none, v4, v6 are deprecated
(assertValueOneOf "DHCP" (boolValues ++ ["ipv4" "ipv6"]))
@ -968,9 +973,13 @@ let
sectionIPv6AcceptRA = checkUnitConfig "IPv6AcceptRA" [
(assertOnlyFields [
"Token"
"UseDNS"
"UseDomains"
"RouteTable"
"UseMTU"
"UseGateway"
"UseRoutePrefix"
"UseAutonomousPrefix"
"UseOnLinkPrefix"
"RouterDenyList"
@ -990,6 +999,9 @@ let
(assertValueOneOf "UseDNS" boolValues)
(assertValueOneOf "UseDomains" (boolValues ++ ["route"]))
(assertRange "RouteTable" 0 4294967295)
(assertValueOneOf "UseMTU" boolValues)
(assertValueOneOf "UseGateway" boolValues)
(assertValueOneOf "UseRoutePrefix" boolValues)
(assertValueOneOf "UseAutonomousPrefix" boolValues)
(assertValueOneOf "UseOnLinkPrefix" boolValues)
(assertValueOneOf "DHCPv6Client" (boolValues ++ ["always"]))