forked from mirrors/nixpkgs
nixos/corerad: use passAsFile while converting settings JSON to TOML
Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
parent
13231517a2
commit
562beabff3
|
@ -6,9 +6,11 @@ let
|
|||
cfg = config.services.corerad;
|
||||
|
||||
writeTOML = name: x:
|
||||
pkgs.runCommandNoCCLocal name { } ''
|
||||
echo '${builtins.toJSON x}' | ${pkgs.go-toml}/bin/jsontoml > $out
|
||||
'';
|
||||
pkgs.runCommandNoCCLocal name {
|
||||
passAsFile = ["config"];
|
||||
config = builtins.toJSON x;
|
||||
buildInputs = [ pkgs.go-toml ];
|
||||
} "jsontoml < $configPath > $out";
|
||||
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ mdlayher ];
|
||||
|
|
Loading…
Reference in a new issue