From 682a01488bb4e3a7c79ea12fb794282c341ec8eb Mon Sep 17 00:00:00 2001 From: ibizaman Date: Mon, 25 Aug 2025 09:34:08 +0200 Subject: [PATCH] postgresql: fix password setup --- modules/blocks/postgresql.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/blocks/postgresql.nix b/modules/blocks/postgresql.nix index ba7c667..92818aa 100644 --- a/modules/blocks/postgresql.nix +++ b/modules/blocks/postgresql.nix @@ -131,8 +131,8 @@ in }; pwdConfig = ensureCfgs: { - systemd.services.postgresql.postStart = - let + systemd.services.postgresql-setup.script = lib.mkAfter + (let prefix = '' psql -tA <<'EOF' DO $$ @@ -150,7 +150,7 @@ in cfgsWithPasswords = builtins.filter (cfg: cfg.passwordFile != null) ensureCfgs; in if (builtins.length cfgsWithPasswords) == 0 then "" else - prefix + (lib.concatStrings (map exec cfgsWithPasswords)) + suffix; + prefix + (lib.concatStrings (map exec cfgsWithPasswords)) + suffix); }; debugConfig = enableDebug: lib.mkIf enableDebug {