nixos/athens: Replace custom jq-based runCommand with pkgs.formats

This commit is contained in:
nicoo
2024-05-25 19:03:56 +00:00
parent ce799c73e5
commit 429f89688a

View File

@@ -140,12 +140,10 @@ let
}
);
configFile = pkgs.runCommandLocal "config.toml" { } ''
${pkgs.buildPackages.jq}/bin/jq 'del(..|nulls)' \
< ${pkgs.writeText "config.json" (builtins.toJSON athensConfig)} | \
${pkgs.buildPackages.remarshal}/bin/remarshal -if json -of toml \
> $out
'';
configFile = lib.pipe athensConfig [
(lib.filterAttrsRecursive (_k: v: v != null))
((pkgs.formats.toml {}).generate "config.toml")
];
in
{
meta = {