mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
nixos/networkd: add ControlledDelay options
This commit is contained in:
parent
728108555e
commit
49df6bc669
@ -1257,6 +1257,19 @@ let
|
||||
(assertValueOneOf "Wash" boolValues)
|
||||
(assertValueOneOf "SplitGSO" boolValues)
|
||||
];
|
||||
|
||||
sectionControlledDelay = checkUnitConfig "ControlledDelay" [
|
||||
(assertOnlyFields [
|
||||
"Parent"
|
||||
"Handle"
|
||||
"PacketLimit"
|
||||
"TargetSec"
|
||||
"IntervalSec"
|
||||
"ECN"
|
||||
"CEThresholdSec"
|
||||
])
|
||||
(assertValueOneOf "ECN" boolValues)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@ -2057,6 +2070,17 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
controlledDelayConfig = mkOption {
|
||||
default = {};
|
||||
example = { Parent = "ingress"; TargetSec = "20msec"; };
|
||||
type = types.addCheck (types.attrsOf unitOption) check.network.sectionControlledDelay;
|
||||
description = lib.mdDoc ''
|
||||
Each attribute in this set specifies an option in the
|
||||
`[ControlledDelay]` section of the unit. See
|
||||
{manpage}`systemd.network(5)` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
@ -2536,6 +2560,10 @@ let
|
||||
[CAKE]
|
||||
${attrsToSection def.cakeConfig}
|
||||
''
|
||||
+ optionalString (def.controlledDelayConfig != { }) ''
|
||||
[ControlledDelay]
|
||||
${attrsToSection def.controlledDelayConfig}
|
||||
''
|
||||
+ def.extraConfig;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user