1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

nixos/tests/grafana/provision: fix test

Not sure why the tmpfile rule fails now, so let's quick-fix it with an
activation script.
This commit is contained in:
Maximilian Bosch 2023-01-29 16:03:35 +01:00
parent 50739b3c0d
commit 859f4aa172
No known key found for this signature in database
GPG key ID: 9A6EEA275CA5BE0A

View file

@ -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 = {