Loading nixos/lib/systemd-network-units.nix +4 −0 Original line number Diff line number Diff line Loading @@ -413,6 +413,10 @@ in [QuickFairQueueingClass] ${attrsToSection def.quickFairQueueingConfigClass} '' + optionalString (def.mobileNetworkConfig != { }) '' [MobileNetwork] ${attrsToSection def.mobileNetworkConfig} '' + flip concatMapStrings def.bridgeVLANs (x: '' [BridgeVLAN] ${attrsToSection x} Loading nixos/modules/system/boot/networkd.nix +58 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,12 @@ let "StatisticsBlockCoalesceSec" "MDI" "SR-IOVVirtualFunctions" "ScatterGather" "ScatterGatherFragmentList" "TCPECNSegmentationOffload" "TCPMangleIdSegmentationOffload" "GenericReceiveOffloadList" "GenericReceiveOffloadUDPForwarding" ]) (assertValueOneOf "MACAddressPolicy" [ "persistent" Loading Loading @@ -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" [ Loading Loading @@ -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) ]; }; }; Loading Loading @@ -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; Loading Loading
nixos/lib/systemd-network-units.nix +4 −0 Original line number Diff line number Diff line Loading @@ -413,6 +413,10 @@ in [QuickFairQueueingClass] ${attrsToSection def.quickFairQueueingConfigClass} '' + optionalString (def.mobileNetworkConfig != { }) '' [MobileNetwork] ${attrsToSection def.mobileNetworkConfig} '' + flip concatMapStrings def.bridgeVLANs (x: '' [BridgeVLAN] ${attrsToSection x} Loading
nixos/modules/system/boot/networkd.nix +58 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,12 @@ let "StatisticsBlockCoalesceSec" "MDI" "SR-IOVVirtualFunctions" "ScatterGather" "ScatterGatherFragmentList" "TCPECNSegmentationOffload" "TCPMangleIdSegmentationOffload" "GenericReceiveOffloadList" "GenericReceiveOffloadUDPForwarding" ]) (assertValueOneOf "MACAddressPolicy" [ "persistent" Loading Loading @@ -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" [ Loading Loading @@ -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) ]; }; }; Loading Loading @@ -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; Loading