From 3e573e6dfb9b4e0897cf4f4803fd1e2bcd7bfc30 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 24 Jan 2026 11:19:17 -0800 Subject: persist some state --- profiles/authelia.nix | 4 ++++ profiles/git-server.nix | 5 +++++ profiles/monitoring.nix | 5 +++++ profiles/postgresql.nix | 6 +++++- 4 files changed, 19 insertions(+), 1 deletion(-) (limited to 'profiles') diff --git a/profiles/authelia.nix b/profiles/authelia.nix index 4a80591..d07651d 100644 --- a/profiles/authelia.nix +++ b/profiles/authelia.nix @@ -22,5 +22,9 @@ }; }; + environment.persistence."/persist/save".directories = [ + config.services.authelia.instances.main.settings.storage.local.path + ]; + networking.firewall.allowedTCPPorts = [ 9092 ]; } diff --git a/profiles/git-server.nix b/profiles/git-server.nix index d162a8e..004c0fa 100644 --- a/profiles/git-server.nix +++ b/profiles/git-server.nix @@ -1,4 +1,5 @@ { + config, pkgs, lib, adminUser, @@ -54,6 +55,10 @@ in ''}" ]; + environment.persistence."/persist/save".directories = [ + config.services.gitolite.dataDir + ]; + services.cgit.main = { enable = true; package = pkgs.cgit; diff --git a/profiles/monitoring.nix b/profiles/monitoring.nix index bc33c11..a203078 100644 --- a/profiles/monitoring.nix +++ b/profiles/monitoring.nix @@ -74,6 +74,11 @@ "oauth2-client-secret:${config.age.secrets.grafana-oidc.path}" ]; + environment.persistence."/persist".directories = [ + config.services.victoriametrics.stateDir + config.services.grafana.dataDir + ]; + services.authelia.instances.main.settings.identity_providers.oidc.clients = [ { id = "grafana"; diff --git a/profiles/postgresql.nix b/profiles/postgresql.nix index 6e473ad..a128a97 100644 --- a/profiles/postgresql.nix +++ b/profiles/postgresql.nix @@ -1,4 +1,4 @@ -{ ... }: +{ config, ... }: { services.postgresql = { enable = true; @@ -17,4 +17,8 @@ enable = true; compression = "zstd"; }; + + environment.persistence."/persist/save".directories = [ + config.services.postgresqlBackup.location + ]; } -- cgit v1.2.3