diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-06-15 00:42:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 00:42:25 +0200 |
commit | 4c67f879f0ee0f4eb610373e479a0a9c518c51c4 (patch) | |
tree | 6f693eeda125b57af77c0b96c094fa4831267526 | |
parent | e8245546f8a3d35bc74abedfc18ad66cf2e30ff2 (diff) | |
parent | 562beabff3e24062a7b62843644f2c90cddc691e (diff) | |
download | nixpkgs-4c67f879f0ee0f4eb610373e479a0a9c518c51c4.tar nixpkgs-4c67f879f0ee0f4eb610373e479a0a9c518c51c4.tar.gz nixpkgs-4c67f879f0ee0f4eb610373e479a0a9c518c51c4.tar.bz2 nixpkgs-4c67f879f0ee0f4eb610373e479a0a9c518c51c4.tar.lz nixpkgs-4c67f879f0ee0f4eb610373e479a0a9c518c51c4.tar.xz nixpkgs-4c67f879f0ee0f4eb610373e479a0a9c518c51c4.tar.zst nixpkgs-4c67f879f0ee0f4eb610373e479a0a9c518c51c4.zip |
Merge pull request #90380 from mdlayher/mdl-corerad-passasfile
nixos/corerad: use passAsFile while converting settings JSON to TOML
-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 ]; |