parent
5ed0924e7b
commit
2b694b1e9f
@ -43,14 +43,15 @@ let
|
|||||||
|
|
||||||
indent = " ";
|
indent = " ";
|
||||||
|
|
||||||
mkRelation = name: value: "${name} = ${mkVal value}";
|
mkRelation = name: value:
|
||||||
|
if (isList value) then
|
||||||
|
concatMapStringsSep "\n" (mkRelation name) value
|
||||||
|
else "${name} = ${mkVal value}";
|
||||||
|
|
||||||
mkVal = value:
|
mkVal = value:
|
||||||
if (value == true) then "true"
|
if (value == true) then "true"
|
||||||
else if (value == false) then "false"
|
else if (value == false) then "false"
|
||||||
else if (isInt value) then (toString value)
|
else if (isInt value) then (toString value)
|
||||||
else if (isList value) then
|
|
||||||
concatMapStringsSep " " mkVal value
|
|
||||||
else if (isAttrs value) then
|
else if (isAttrs value) then
|
||||||
let configLines = concatLists
|
let configLines = concatLists
|
||||||
(map (splitString "\n")
|
(map (splitString "\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user