Merge pull request #31477 from andir/fix-babeld-config
Fix babeld config
This commit is contained in:
commit
06d0ba1ee9
@ -6,8 +6,10 @@ let
|
|||||||
|
|
||||||
cfg = config.services.babeld;
|
cfg = config.services.babeld;
|
||||||
|
|
||||||
|
conditionalBoolToString = value: if (isBool value) then (boolToString value) else (toString value);
|
||||||
|
|
||||||
paramsString = params:
|
paramsString = params:
|
||||||
concatMapStringsSep "" (name: "${name} ${boolToString (getAttr name params)}")
|
concatMapStringsSep " " (name: "${name} ${conditionalBoolToString (getAttr name params)}")
|
||||||
(attrNames params);
|
(attrNames params);
|
||||||
|
|
||||||
interfaceConfig = name:
|
interfaceConfig = name:
|
||||||
@ -49,7 +51,7 @@ in
|
|||||||
type = types.nullOr (types.attrsOf types.unspecified);
|
type = types.nullOr (types.attrsOf types.unspecified);
|
||||||
example =
|
example =
|
||||||
{
|
{
|
||||||
wired = true;
|
type = "tunnel";
|
||||||
"split-horizon" = true;
|
"split-horizon" = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -63,7 +65,7 @@ in
|
|||||||
type = types.attrsOf (types.attrsOf types.unspecified);
|
type = types.attrsOf (types.attrsOf types.unspecified);
|
||||||
example =
|
example =
|
||||||
{ enp0s2 =
|
{ enp0s2 =
|
||||||
{ wired = true;
|
{ type = "wired";
|
||||||
"hello-interval" = 5;
|
"hello-interval" = 5;
|
||||||
"split-horizon" = "auto";
|
"split-horizon" = "auto";
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user