From 859f4aa1722ce688f320586d0c90ce76d0bd2158 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 29 Jan 2023 16:03:35 +0100 Subject: nixos/tests/grafana/provision: fix test Not sure why the tmpfile rule fails now, so let's quick-fix it with an activation script. --- nixos/tests/grafana/provision/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'nixos') 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 = { -- cgit v1.2.3