Merge pull request #213392 from Ma27/grafana-fix-provision-test

nixos/tests/grafana/provision: fix test
This commit is contained in:
Maximilian Bosch 2023-01-31 13:49:28 +01:00 committed by GitHub
commit e6ad298b7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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