nixos/networkd: add QDisc options
This commit is contained in:
parent
09e745c784
commit
b08e5be98d
|
@ -1097,6 +1097,14 @@ let
|
||||||
(assertValueOneOf "Mode" [ "datagram" "connected" ])
|
(assertValueOneOf "Mode" [ "datagram" "connected" ])
|
||||||
(assertValueOneOf "IgnoreUserspaceMulticastGroup" boolValues)
|
(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 {
|
name = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -2196,6 +2215,10 @@ let
|
||||||
[IPoIB]
|
[IPoIB]
|
||||||
${attrsToSection def.ipoIBConfig}
|
${attrsToSection def.ipoIBConfig}
|
||||||
''
|
''
|
||||||
|
+ optionalString (def.qdiscConfig != { }) ''
|
||||||
|
[QDisc]
|
||||||
|
${attrsToSection def.qdiscConfig}
|
||||||
|
''
|
||||||
+ def.extraConfig;
|
+ def.extraConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue