diff options
author | apfelkuchen06 <apfelkuchen@hrnz.li> | 2023-02-28 00:06:40 +0100 |
---|---|---|
committer | apfelkuchen06 <apfelkuchen@hrnz.li> | 2023-03-16 03:31:03 +0100 |
commit | 29e54519636578683070f9c778ac207fedf1e56a (patch) | |
tree | 21a5ecf29fdd9c6bfd1a18e6f0ea1728bb7514ca /nixos/modules/system/boot/networkd.nix | |
parent | cf470ebd88c4b9e8d4b7ae875ffaebbef6b2b02e (diff) | |
download | nixpkgs-29e54519636578683070f9c778ac207fedf1e56a.tar nixpkgs-29e54519636578683070f9c778ac207fedf1e56a.tar.gz nixpkgs-29e54519636578683070f9c778ac207fedf1e56a.tar.bz2 nixpkgs-29e54519636578683070f9c778ac207fedf1e56a.tar.lz nixpkgs-29e54519636578683070f9c778ac207fedf1e56a.tar.xz nixpkgs-29e54519636578683070f9c778ac207fedf1e56a.tar.zst nixpkgs-29e54519636578683070f9c778ac207fedf1e56a.zip |
nixos/networkd: add TrivialLinkEqualizer options
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-rw-r--r-- | nixos/modules/system/boot/networkd.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index ce23c59895c..1efe840acf2 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -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; }; |