diff options
author | apfelkuchen06 <apfelkuchen@hrnz.li> | 2023-02-28 00:06:40 +0100 |
---|---|---|
committer | apfelkuchen06 <apfelkuchen@hrnz.li> | 2023-03-16 03:28:23 +0100 |
commit | ca496f87548eb194280d2a3a4489380b94d088eb (patch) | |
tree | a8ec2cd666b684531363d89797092f8f7f0efc1c /nixos/modules/system/boot/networkd.nix | |
parent | 3cde7aaa36a3089f7881c9f65e7c37bf65f9177d (diff) | |
download | nixpkgs-ca496f87548eb194280d2a3a4489380b94d088eb.tar nixpkgs-ca496f87548eb194280d2a3a4489380b94d088eb.tar.gz nixpkgs-ca496f87548eb194280d2a3a4489380b94d088eb.tar.bz2 nixpkgs-ca496f87548eb194280d2a3a4489380b94d088eb.tar.lz nixpkgs-ca496f87548eb194280d2a3a4489380b94d088eb.tar.xz nixpkgs-ca496f87548eb194280d2a3a4489380b94d088eb.tar.zst nixpkgs-ca496f87548eb194280d2a3a4489380b94d088eb.zip |
nixos/networkd: add EnhancedTransmissionSelection options
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-rw-r--r-- | nixos/modules/system/boot/networkd.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 490bcb6e4fc..87e70d48a75 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -1285,6 +1285,21 @@ let "QuantumBytes" ]) ]; + + sectionEnhancedTransmissionSelection = checkUnitConfig "EnhancedTransmissionSelection" [ + (assertOnlyFields [ + "Parent" + "Handle" + "Bands" + "StrictBands" + "QuantumBytes" + "PriorityMap" + ]) + (assertInt "Bands") + (assertRange "Bands" 1 16) + (assertInt "StrictBands") + (assertRange "StrictBands" 1 16) + ]; }; }; @@ -2118,6 +2133,17 @@ let ''; }; + enhancedTransmissionSelectionConfig = mkOption { + default = {}; + example = { Parent = "root"; QuantumBytes = "300k"; Bands = 3; PriorityMap = "100 200 300"; }; + type = types.addCheck (types.attrsOf unitOption) check.network.sectionEnhancedTransmissionSelection; + description = lib.mdDoc '' + Each attribute in this set specifies an option in the + `[EnhancedTransmissionSelection]` section of the unit. See + {manpage}`systemd.network(5)` for details. + ''; + }; + name = mkOption { type = types.nullOr types.str; default = null; @@ -2609,6 +2635,10 @@ let [DeficitRoundRobinSchedulerClass] ${attrsToSection def.deficitRoundRobinSchedulerClassConfig} '' + + optionalString (def.enhancedTransmissionSelectionConfig != { }) '' + [EnhancedTransmissionSelection] + ${attrsToSection def.enhancedTransmissionSelectionConfig} + '' + def.extraConfig; }; |