nixos/networkd: add TrivialLinkEqualizer options

This commit is contained in:
apfelkuchen06 2023-02-28 00:06:40 +01:00
parent cf470ebd88
commit 29e5451963

View File

@ -1353,6 +1353,14 @@ let
(assertInt "OrphanMask")
(assertValueOneOf "Pacing" boolValues)
];
sectionTrivialLinkEqualizer = checkUnitConfig "TrivialLinkEqualizer" [
(assertOnlyFields [
"Parent"
"Handle"
"Id"
])
];
};
};
@ -2230,6 +2238,17 @@ let
'';
};
trivialLinkEqualizerConfig = mkOption {
default = {};
example = { Parent = "root"; Id = 0; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionTrivialLinkEqualizer;
description = lib.mdDoc ''
Each attribute in this set specifies an option in the
`[TrivialLinkEqualizer]` section of the unit. See
{manpage}`systemd.network(5)` for details.
'';
};
name = mkOption {
type = types.nullOr types.str;
default = null;
@ -2737,6 +2756,10 @@ let
[FairQueueing]
${attrsToSection def.fairQueueingConfig}
''
+ optionalString (def.trivialLinkEqualizerConfig != { }) ''
[TrivialLinkEqualizer]
${attrsToSection def.trivialLinkEqualizerConfig}
''
+ def.extraConfig;
};