From ca1b4d37af54258ee5257bef69d320ee5e66895d Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Mon, 1 Apr 2024 11:29:34 +0200 Subject: [PATCH] Fix postgres persistence permisions --- hosts/nixos/common/optional/services/postgres.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/nixos/common/optional/services/postgres.nix b/hosts/nixos/common/optional/services/postgres.nix index 367ecaa..aec1668 100644 --- a/hosts/nixos/common/optional/services/postgres.nix +++ b/hosts/nixos/common/optional/services/postgres.nix @@ -1,3 +1,7 @@ { - environment.persistence."/persist/state".directories = [ "/var/lib/postgresql" ]; + environment.persistence."/persist/state".directories = [{ + directory = "/var/lib/postgresql"; + user = "postgres"; + group = "postgres"; + }]; }