diff --git a/hosts/nixos/lapetus/services/grafana.nix b/hosts/nixos/lapetus/services/grafana.nix index c2e9deb..d7edc33 100644 --- a/hosts/nixos/lapetus/services/grafana.nix +++ b/hosts/nixos/lapetus/services/grafana.nix @@ -58,8 +58,10 @@ in services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = config.satellite.proxy config.services.grafana.settings.server.http_port { }; - environment.persistence."/persist/state".directories = [ - config.services.grafana.dataDir - ]; + environment.persistence."/persist/state".directories = [{ + directory = config.services.grafana.dataDir; + user = "grafana"; + group = "grafana"; + }]; # }}} } diff --git a/hosts/nixos/lapetus/services/prometheus.nix b/hosts/nixos/lapetus/services/prometheus.nix index 8ecd30f..cbb3467 100644 --- a/hosts/nixos/lapetus/services/prometheus.nix +++ b/hosts/nixos/lapetus/services/prometheus.nix @@ -34,8 +34,10 @@ in config.services.grafana.port { proxyWebsockets = true; }; - environment.persistence."/persist/state".directories = [ - "/var/lib/prometheus2" - ]; + environment.persistence."/persist/state".directories = [{ + directory = "/var/lib/prometheus2"; + user = "prometheus"; + group = "prometheus"; + }]; # }}} }