Ensure state directory exists & belongs to grafana
This commit is contained in:
parent
7d69953ffb
commit
810f6a5bca
|
@ -94,6 +94,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${cfg.state-directory} 0700 ${config.systemd.services.grafana.serviceConfig.User} root - -"
|
||||||
|
];
|
||||||
|
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = "${cfg.state-directory}/data";
|
dataDir = "${cfg.state-directory}/data";
|
||||||
|
|
Loading…
Reference in New Issue