nixos/networkd: add DeficitRoundRobinScheduler options

This commit is contained in:
apfelkuchen06 2023-02-28 00:06:40 +01:00
parent 49df6bc669
commit 0d06e85996

View File

@ -1270,6 +1270,13 @@ let
])
(assertValueOneOf "ECN" boolValues)
];
sectionDeficitRoundRobinScheduler = checkUnitConfig "DeficitRoundRobinScheduler" [
(assertOnlyFields [
"Parent"
"Handle"
])
];
};
};
@ -2081,6 +2088,17 @@ let
'';
};
deficitRoundRobinSchedulerConfig = mkOption {
default = {};
example = { Parent = "root"; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionDeficitRoundRobinScheduler;
description = lib.mdDoc ''
Each attribute in this set specifies an option in the
`[DeficitRoundRobinScheduler]` section of the unit. See
{manpage}`systemd.network(5)` for details.
'';
};
name = mkOption {
type = types.nullOr types.str;
default = null;
@ -2564,6 +2582,10 @@ let
[ControlledDelay]
${attrsToSection def.controlledDelayConfig}
''
+ optionalString (def.deficitRoundRobinSchedulerConfig != { }) ''
[DeficitRoundRobinScheduler]
${attrsToSection def.deficitRoundRobinSchedulerConfig}
''
+ def.extraConfig;
};