Merge pull request #31477 from andir/fix-babeld-config

Fix babeld config
This commit is contained in:
Franz Pletz 2017-11-14 12:12:59 +01:00 committed by GitHub
commit 06d0ba1ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,8 +6,10 @@ let
cfg = config.services.babeld;
conditionalBoolToString = value: if (isBool value) then (boolToString value) else (toString value);
paramsString = params:
concatMapStringsSep "" (name: "${name} ${boolToString (getAttr name params)}")
concatMapStringsSep " " (name: "${name} ${conditionalBoolToString (getAttr name params)}")
(attrNames params);
interfaceConfig = name:
@ -49,7 +51,7 @@ in
type = types.nullOr (types.attrsOf types.unspecified);
example =
{
wired = true;
type = "tunnel";
"split-horizon" = true;
};
};
@ -63,7 +65,7 @@ in
type = types.attrsOf (types.attrsOf types.unspecified);
example =
{ enp0s2 =
{ wired = true;
{ type = "wired";
"hello-interval" = 5;
"split-horizon" = "auto";
};