mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
nixos/networkd: add QDisc options
This commit is contained in:
parent
09e745c784
commit
b08e5be98d
@ -1097,6 +1097,14 @@ let
|
||||
(assertValueOneOf "Mode" [ "datagram" "connected" ])
|
||||
(assertValueOneOf "IgnoreUserspaceMulticastGroup" boolValues)
|
||||
];
|
||||
|
||||
sectionQDisc = checkUnitConfig "QDisc" [
|
||||
(assertOnlyFields [
|
||||
"Parent"
|
||||
"Handle"
|
||||
])
|
||||
(assertValueOneOf "Parent" [ "clsact" "ingress" ])
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@ -1765,6 +1773,17 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
qdiscConfig = mkOption {
|
||||
default = {};
|
||||
example = { Parent = "ingress"; };
|
||||
type = types.addCheck (types.attrsOf unitOption) check.network.sectionQDisc;
|
||||
description = lib.mdDoc ''
|
||||
Each attribute in this set specifies an option in the
|
||||
`[QDisc]` section of the unit. See
|
||||
{manpage}`systemd.network(5)` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
@ -2196,6 +2215,10 @@ let
|
||||
[IPoIB]
|
||||
${attrsToSection def.ipoIBConfig}
|
||||
''
|
||||
+ optionalString (def.qdiscConfig != { }) ''
|
||||
[QDisc]
|
||||
${attrsToSection def.qdiscConfig}
|
||||
''
|
||||
+ def.extraConfig;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user