Loading nixos/modules/system/boot/networkd.nix +50 −0 Original line number Diff line number Diff line Loading @@ -1414,6 +1414,16 @@ let (assertInt "Weight") (assertRange "Weight" 1 1023) ]; sectionBridgeVLAN = checkUnitConfig "BridgeVLAN" [ (assertOnlyFields [ "VLAN" "EgressUntagged" "PVID" ]) (assertInt "PVID") (assertRange "PVID" 0 4094) ]; }; }; Loading Loading @@ -1879,6 +1889,21 @@ let }; }; bridgeVLANOptions = { options = { bridgeMDBConfig = mkOption { default = {}; example = { VLAN = 20; }; type = types.addCheck (types.attrsOf unitOption) check.network.sectionBridgeVLAN; description = lib.mdDoc '' Each attribute in this set specifies an option in the `[BridgeVLAN]` section of the unit. See {manpage}`systemd.network(5)` for details. ''; }; }; }; networkOptions = commonNetworkOptions // { linkConfig = mkOption { Loading Loading @@ -2357,6 +2382,27 @@ let ''; }; bridgeVLANConfig = mkOption { default = {}; example = { VLAN = "10-20"; }; type = types.addCheck (types.attrsOf unitOption) check.network.sectionbridgeVLAN; description = lib.mdDoc '' Each attribute in this set specifies an option in the `[BridgeVLAN]` section of the unit. See {manpage}`systemd.network(5)` for details. ''; }; bridgeVLANs = mkOption { default = []; example = [ { bridgeVLANConfig = { VLAN = "10-20"; }; } ]; type = with types; listOf (submodule bridgeVLANOptions); description = lib.mdDoc '' A list of BridgeVLAN sections to be added to the unit. See {manpage}`systemd.network(5)` for details. ''; }; name = mkOption { type = types.nullOr types.str; default = null; Loading Loading @@ -2888,6 +2934,10 @@ let [QuickFairQueueingClass] ${attrsToSection def.quickFairQueueingConfigClass} '' + flip concatMapStrings def.bridgeVLANs (x: '' [BridgeVLAN] ${attrsToSection x.bridgeVLANConfig} '') + def.extraConfig; }; Loading Loading
nixos/modules/system/boot/networkd.nix +50 −0 Original line number Diff line number Diff line Loading @@ -1414,6 +1414,16 @@ let (assertInt "Weight") (assertRange "Weight" 1 1023) ]; sectionBridgeVLAN = checkUnitConfig "BridgeVLAN" [ (assertOnlyFields [ "VLAN" "EgressUntagged" "PVID" ]) (assertInt "PVID") (assertRange "PVID" 0 4094) ]; }; }; Loading Loading @@ -1879,6 +1889,21 @@ let }; }; bridgeVLANOptions = { options = { bridgeMDBConfig = mkOption { default = {}; example = { VLAN = 20; }; type = types.addCheck (types.attrsOf unitOption) check.network.sectionBridgeVLAN; description = lib.mdDoc '' Each attribute in this set specifies an option in the `[BridgeVLAN]` section of the unit. See {manpage}`systemd.network(5)` for details. ''; }; }; }; networkOptions = commonNetworkOptions // { linkConfig = mkOption { Loading Loading @@ -2357,6 +2382,27 @@ let ''; }; bridgeVLANConfig = mkOption { default = {}; example = { VLAN = "10-20"; }; type = types.addCheck (types.attrsOf unitOption) check.network.sectionbridgeVLAN; description = lib.mdDoc '' Each attribute in this set specifies an option in the `[BridgeVLAN]` section of the unit. See {manpage}`systemd.network(5)` for details. ''; }; bridgeVLANs = mkOption { default = []; example = [ { bridgeVLANConfig = { VLAN = "10-20"; }; } ]; type = with types; listOf (submodule bridgeVLANOptions); description = lib.mdDoc '' A list of BridgeVLAN sections to be added to the unit. See {manpage}`systemd.network(5)` for details. ''; }; name = mkOption { type = types.nullOr types.str; default = null; Loading Loading @@ -2888,6 +2934,10 @@ let [QuickFairQueueingClass] ${attrsToSection def.quickFairQueueingConfigClass} '' + flip concatMapStrings def.bridgeVLANs (x: '' [BridgeVLAN] ${attrsToSection x.bridgeVLANConfig} '') + def.extraConfig; }; Loading