babeld module: support non-boolean default arguments
Previosuly only boolean values would be rendered properly. All other values would cause an error. Even the example configuration did fail.
This commit is contained in:
parent
236a7c5452
commit
5d9073747a
1 changed files with 3 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue