diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2023-01-29 16:03:35 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2023-01-29 16:50:56 +0100 |
commit | 859f4aa1722ce688f320586d0c90ce76d0bd2158 (patch) | |
tree | cdead372fa3b7a35b113c5b9092a4ee1f8452475 | |
parent | 50739b3c0de0c0ac6bb3f02942b2bd101a0c3b3c (diff) |
nixos/tests/grafana/provision: fix test
Not sure why the tmpfile rule fails now, so let's quick-fix it with an
activation script.
-rw-r--r-- | nixos/tests/grafana/provision/default.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nixos/tests/grafana/provision/default.nix b/nixos/tests/grafana/provision/default.nix index 1eb927632eb7..96378452ade3 100644 --- a/nixos/tests/grafana/provision/default.nix +++ b/nixos/tests/grafana/provision/default.nix @@ -22,9 +22,15 @@ let }; }; - systemd.tmpfiles.rules = [ - "L /var/lib/grafana/dashboards/test.json 0700 grafana grafana - ${pkgs.writeText "test.json" (builtins.readFile ./test_dashboard.json)}" - ]; + system.activationScripts.setup-grafana = { + deps = [ "users" ]; + text = '' + mkdir -p /var/lib/grafana/dashboards + chown -R grafana:grafana /var/lib/grafana + chmod 0700 -R /var/lib/grafana/dashboards + cp ${pkgs.writeText "test.json" (builtins.readFile ./test_dashboard.json)} /var/lib/grafana/dashboards/ + ''; + }; }; extraNodeConfs = { |