diff options
author | Matt Layher <mdlayher@gmail.com> | 2020-06-14 13:30:17 -0400 |
---|---|---|
committer | Matt Layher <mdlayher@gmail.com> | 2020-06-14 13:30:17 -0400 |
commit | 562beabff3e24062a7b62843644f2c90cddc691e (patch) | |
tree | 792f6742c790a459287cb7b92b010cf9daed9a97 /nixos/modules/services/networking/corerad.nix | |
parent | 13231517a293eb0b835d1e12dffceeffdb1d472d (diff) | |
download | nixpkgs-562beabff3e24062a7b62843644f2c90cddc691e.tar nixpkgs-562beabff3e24062a7b62843644f2c90cddc691e.tar.gz nixpkgs-562beabff3e24062a7b62843644f2c90cddc691e.tar.bz2 nixpkgs-562beabff3e24062a7b62843644f2c90cddc691e.tar.lz nixpkgs-562beabff3e24062a7b62843644f2c90cddc691e.tar.xz nixpkgs-562beabff3e24062a7b62843644f2c90cddc691e.tar.zst nixpkgs-562beabff3e24062a7b62843644f2c90cddc691e.zip |
nixos/corerad: use passAsFile while converting settings JSON to TOML
Signed-off-by: Matt Layher <mdlayher@gmail.com>
Diffstat (limited to 'nixos/modules/services/networking/corerad.nix')
-rw-r--r-- | nixos/modules/services/networking/corerad.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/corerad.nix b/nixos/modules/services/networking/corerad.nix index 2d4d414aae1..5d73c0a0d77 100644 --- a/nixos/modules/services/networking/corerad.nix +++ b/nixos/modules/services/networking/corerad.nix @@ -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 ]; |