mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/networkd: add IPoIB options
This commit is contained in:
parent
df14953724
commit
09e745c784
1 changed files with 24 additions and 0 deletions
|
@ -1088,6 +1088,15 @@ let
|
||||||
(assertValueOneOf "PresumeAck" boolValues)
|
(assertValueOneOf "PresumeAck" boolValues)
|
||||||
(assertValueOneOf "ClassicDataLengthCode" boolValues)
|
(assertValueOneOf "ClassicDataLengthCode" boolValues)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sectionIPoIB = checkUnitConfig "IPoIB" [
|
||||||
|
(assertOnlyFields [
|
||||||
|
"Mode"
|
||||||
|
"IgnoreUserspaceMulticastGroup"
|
||||||
|
])
|
||||||
|
(assertValueOneOf "Mode" [ "datagram" "connected" ])
|
||||||
|
(assertValueOneOf "IgnoreUserspaceMulticastGroup" boolValues)
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1745,6 +1754,17 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ipoIBConfig = mkOption {
|
||||||
|
default = {};
|
||||||
|
example = { };
|
||||||
|
type = types.addCheck (types.attrsOf unitOption) check.network.sectionIPoIB;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Each attribute in this set specifies an option in the
|
||||||
|
`[IPoIB]` 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;
|
||||||
|
@ -2172,6 +2192,10 @@ let
|
||||||
[CAN]
|
[CAN]
|
||||||
${attrsToSection def.canConfig}
|
${attrsToSection def.canConfig}
|
||||||
''
|
''
|
||||||
|
+ optionalString (def.ipoIBConfig != { }) ''
|
||||||
|
[IPoIB]
|
||||||
|
${attrsToSection def.ipoIBConfig}
|
||||||
|
''
|
||||||
+ def.extraConfig;
|
+ def.extraConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue