nixos/nncp: recursively merge configurations

This commit is contained in:
Emery Hemingway 2024-11-21 11:06:22 +00:00
parent 2e9c42e1c8
commit 50bbfb5788

View File

@ -79,7 +79,7 @@ in {
for f in ${jsonCfgFile} ${builtins.toString config.programs.nncp.secrets} for f in ${jsonCfgFile} ${builtins.toString config.programs.nncp.secrets}
do do
${lib.getExe pkgs.hjson-go} -c <"$f" ${lib.getExe pkgs.hjson-go} -c <"$f"
done |${lib.getExe pkgs.jq} --slurp add >${nncpCfgFile} done |${lib.getExe pkgs.jq} --slurp 'reduce .[] as $x ({}; . * $x)' >${nncpCfgFile}
chgrp ${programCfg.group} ${nncpCfgFile} chgrp ${programCfg.group} ${nncpCfgFile}
''; '';
}; };