Merge pull request #90380 from mdlayher/mdl-corerad-passasfile
nixos/corerad: use passAsFile while converting settings JSON to TOML
This commit is contained in:
commit
4c67f879f0
@ -6,9 +6,11 @@ let
|
|||||||
cfg = config.services.corerad;
|
cfg = config.services.corerad;
|
||||||
|
|
||||||
writeTOML = name: x:
|
writeTOML = name: x:
|
||||||
pkgs.runCommandNoCCLocal name { } ''
|
pkgs.runCommandNoCCLocal name {
|
||||||
echo '${builtins.toJSON x}' | ${pkgs.go-toml}/bin/jsontoml > $out
|
passAsFile = ["config"];
|
||||||
'';
|
config = builtins.toJSON x;
|
||||||
|
buildInputs = [ pkgs.go-toml ];
|
||||||
|
} "jsontoml < $configPath > $out";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = with maintainers; [ mdlayher ];
|
meta.maintainers = with maintainers; [ mdlayher ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user