From b3ea882e4c3d9211bc6489887b41b6517801840d Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 19 Jul 2026 16:41:40 +0200 Subject: modules/monitoring/: Persist all state directories --- modules/by-name/mo/monitoring/components/prometheus.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/by-name/mo/monitoring/components/prometheus.nix') diff --git a/modules/by-name/mo/monitoring/components/prometheus.nix b/modules/by-name/mo/monitoring/components/prometheus.nix index bf95a6b..44c5952 100644 --- a/modules/by-name/mo/monitoring/components/prometheus.nix +++ b/modules/by-name/mo/monitoring/components/prometheus.nix @@ -42,6 +42,16 @@ in { config = lib.mkIf cfg.enable { vhack = { nginx.enable = true; + + persist.directories = [ + { + directory = "/var/lib/prometheus2"; + user = "prometheus"; + group = "prometheus"; + mode = "0700"; + } + ]; + monitoring.prometheus.sources = [ { name = "node"; -- cgit v1.3.1