mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
nixos/networkd: add PFIFOFast options
This commit is contained in:
parent
f75ec30fee
commit
7a6cae0e15
@ -1200,6 +1200,13 @@ let
|
||||
(assertInt "PacketLimit")
|
||||
(assertRange "PacketLimit" 0 4294967294)
|
||||
];
|
||||
|
||||
sectionPFIFOFast = checkUnitConfig "PFIFOFast" [
|
||||
(assertOnlyFields [
|
||||
"Parent"
|
||||
"Handle"
|
||||
])
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@ -1978,6 +1985,17 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
pfifoFastConfig = mkOption {
|
||||
default = {};
|
||||
example = { Parent = "ingress"; };
|
||||
type = types.addCheck (types.attrsOf unitOption) check.network.sectionPFIFOFast;
|
||||
description = lib.mdDoc ''
|
||||
Each attribute in this set specifies an option in the
|
||||
`[PFIFOFast]` section of the unit. See
|
||||
{manpage}`systemd.network(5)` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
@ -2449,6 +2467,10 @@ let
|
||||
[PFIFOHeadDrop]
|
||||
${attrsToSection def.pfifoHeadDropConfig}
|
||||
''
|
||||
+ optionalString (def.pfifoFastConfig != { }) ''
|
||||
[PFIFOFast]
|
||||
${attrsToSection def.pfifoFastConfig}
|
||||
''
|
||||
+ def.extraConfig;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user