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:
parent
50739b3c0d
commit
859f4aa172
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue