nixos/systemd-networkd: add new options for v260 (#513521)
This commit is contained in:
@@ -413,6 +413,10 @@ in
|
||||
[QuickFairQueueingClass]
|
||||
${attrsToSection def.quickFairQueueingConfigClass}
|
||||
''
|
||||
+ optionalString (def.mobileNetworkConfig != { }) ''
|
||||
[MobileNetwork]
|
||||
${attrsToSection def.mobileNetworkConfig}
|
||||
''
|
||||
+ flip concatMapStrings def.bridgeVLANs (x: ''
|
||||
[BridgeVLAN]
|
||||
${attrsToSection x}
|
||||
|
||||
@@ -180,6 +180,12 @@ let
|
||||
"StatisticsBlockCoalesceSec"
|
||||
"MDI"
|
||||
"SR-IOVVirtualFunctions"
|
||||
"ScatterGather"
|
||||
"ScatterGatherFragmentList"
|
||||
"TCPECNSegmentationOffload"
|
||||
"TCPMangleIdSegmentationOffload"
|
||||
"GenericReceiveOffloadList"
|
||||
"GenericReceiveOffloadUDPForwarding"
|
||||
])
|
||||
(assertValueOneOf "MACAddressPolicy" [
|
||||
"persistent"
|
||||
@@ -271,6 +277,12 @@ let
|
||||
"auto"
|
||||
])
|
||||
(assertRange "SR-IOVVirtualFunctions" 0 2147483647)
|
||||
(assertValueOneOf "ScatterGather" boolValues)
|
||||
(assertValueOneOf "ScatterGatherFragmentList" boolValues)
|
||||
(assertValueOneOf "TCPECNSegmentationOffload" boolValues)
|
||||
(assertValueOneOf "TCPMangleIdSegmentationOffload" boolValues)
|
||||
(assertValueOneOf "GenericReceiveOffloadList" boolValues)
|
||||
(assertValueOneOf "GenericReceiveOffloadUDPForwarding" boolValues)
|
||||
];
|
||||
|
||||
sectionSR-IOV = checkUnitConfig "SR-IOV" [
|
||||
@@ -2412,6 +2424,38 @@ let
|
||||
(assertInt "PVID")
|
||||
(assertRange "PVID" 0 4094)
|
||||
];
|
||||
|
||||
sectionMobileNetwork = checkUnitConfig "MobileNetwork" [
|
||||
(assertOnlyFields [
|
||||
"APN"
|
||||
"AllowedAuthenticationMechanisms"
|
||||
"User"
|
||||
"Password"
|
||||
"IPFamily"
|
||||
"AllowRoaming"
|
||||
"PIN"
|
||||
"OperatorId"
|
||||
"RouteMetric"
|
||||
"UseGateway"
|
||||
])
|
||||
(assertValuesSomeOfOr "AllowedAuthenticationMechanisms" [
|
||||
"none"
|
||||
"pap"
|
||||
"chap"
|
||||
"mschap"
|
||||
"mschapv2"
|
||||
"eap"
|
||||
] "")
|
||||
(assertValueOneOf "IPFamily" [
|
||||
"ipv4"
|
||||
"ipv6"
|
||||
"both"
|
||||
"any"
|
||||
])
|
||||
(assertValueOneOf "AllowRoaming" boolValues)
|
||||
(assertRange "RouteMetric" 0 4294967295)
|
||||
(assertValueOneOf "UseGateway" boolValues)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3746,6 +3790,20 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
mobileNetworkConfig = mkOption {
|
||||
default = { };
|
||||
example = {
|
||||
APN = "access-point-name";
|
||||
AllowRoaming = false;
|
||||
};
|
||||
type = types.addCheck (types.attrsOf unitOption) check.network.sectionMobileNetwork;
|
||||
description = ''
|
||||
Each attribute in this set specifies an option in the
|
||||
`[MobileNetwork]` section of the unit. See
|
||||
{manpage}`systemd.network(5)` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
|
||||
Reference in New Issue
Block a user