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 "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 {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
|
@ -2172,6 +2192,10 @@ let
|
|||
[CAN]
|
||||
${attrsToSection def.canConfig}
|
||||
''
|
||||
+ optionalString (def.ipoIBConfig != { }) ''
|
||||
[IPoIB]
|
||||
${attrsToSection def.ipoIBConfig}
|
||||
''
|
||||
+ def.extraConfig;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue