nixos/krb5: output lists as multiple config entries

Fixes #89626
This commit is contained in:
Nico Heitmann 2020-06-07 16:10:35 +02:00
parent 5ed0924e7b
commit 2b694b1e9f

@ -43,14 +43,15 @@ let
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:
if (value == true) then "true"
else if (value == false) then "false"
else if (isInt value) then (toString value)
else if (isList value) then
concatMapStringsSep " " mkVal value
else if (isAttrs value) then
let configLines = concatLists
(map (splitString "\n")