diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-05-08 18:01:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 18:01:10 +0000 |
commit | e92815729dc9bfb56b23826715df01a453e442da (patch) | |
tree | 64292e01646b883d1d96ec84632b423323f0500f /nixos | |
parent | eaaed3f1d21869c60c00abbdb6d947e0f6f878e9 (diff) | |
parent | c1602f79c3419078c09e2720f15e57382099b886 (diff) | |
download | nixpkgs-e92815729dc9bfb56b23826715df01a453e442da.tar nixpkgs-e92815729dc9bfb56b23826715df01a453e442da.tar.gz nixpkgs-e92815729dc9bfb56b23826715df01a453e442da.tar.bz2 nixpkgs-e92815729dc9bfb56b23826715df01a453e442da.tar.lz nixpkgs-e92815729dc9bfb56b23826715df01a453e442da.tar.xz nixpkgs-e92815729dc9bfb56b23826715df01a453e442da.tar.zst nixpkgs-e92815729dc9bfb56b23826715df01a453e442da.zip |
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/default.nix | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/default.nix b/nixos/modules/services/monitoring/prometheus/default.nix index 52525e8935b..ceb2db1faef 100644 --- a/nixos/modules/services/monitoring/prometheus/default.nix +++ b/nixos/modules/services/monitoring/prometheus/default.nix @@ -3,6 +3,7 @@ with lib; let + json = pkgs.formats.json { }; cfg = config.services.prometheus; workingDir = "/var/lib/" + cfg.stateDir; @@ -34,13 +35,7 @@ let promtool ${what} $out '' else file; - # Pretty-print JSON to a file - writePrettyJSON = name: x: - pkgs.runCommandLocal name { } '' - echo '${builtins.toJSON x}' | ${pkgs.jq}/bin/jq . > $out - ''; - - generatedPrometheusYml = writePrettyJSON "prometheus.yml" promConfig; + generatedPrometheusYml = json.generate "prometheus.yml" promConfig; # This becomes the main config file for Prometheus promConfig = { |