Skip to content

Commit

Permalink
nixos/networkd: add QuickFairQueueing options
Browse files Browse the repository at this point in the history
  • Loading branch information
apfelkuchen6 committed Mar 16, 2023
1 parent 493ed75 commit fde806d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions nixos/modules/system/boot/networkd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,13 @@ let
(assertInt "PacketLimit")
(assertRange "PacketLimit" 0 4294967294)
];

sectionQuickFairQueueing = checkUnitConfig "QuickFairQueueing" [
(assertOnlyFields [
"Parent"
"Handle"
])
];
};
};

Expand Down Expand Up @@ -2317,6 +2324,17 @@ let
'';
};

quickFairQueueingConfig = mkOption {
default = {};
example = { Parent = "root"; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionQuickFairQueueing;
description = lib.mdDoc ''
Each attribute in this set specifies an option in the
`[QuickFairQueueing]` section of the unit. See
{manpage}`systemd.network(5)` for details.
'';
};

name = mkOption {
type = types.nullOr types.str;
default = null;
Expand Down Expand Up @@ -2840,6 +2858,10 @@ let
[HeavyHitterFilter]
${attrsToSection def.heavyHitterFilterConfig}
''
+ optionalString (def.quickFairQueueingConfig != { }) ''
[QuickFairQueueing]
${attrsToSection def.quickFairQueueingConfig}
''
+ def.extraConfig;
};

Expand Down

0 comments on commit fde806d

Please sign in to comment.