From 105e95b8865812af9663deda514dc1fcfb103edf Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Thu, 10 Aug 2023 16:05:53 -0500 Subject: [PATCH] fix replication --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 9e185a4..0ace9c4 100644 --- a/flake.nix +++ b/flake.nix @@ -531,7 +531,7 @@ ) // ( if (cfg.replication.enable && cfg.replication.role == "replica") then { - PGPASSFILE = "${dataDir}/.pgpass"; + PGPASSFILE = "${rootDir}/.pgpass"; } else { } ); @@ -564,8 +564,8 @@ else '' read -r password < ${cfg.replication.passwordFile} - (umask 077; echo "${cfg.replication.primary.hostname}:${builtins.toString cfg.replication.primary.port}:replication:${cfg.replication.username}:''${password}" > ${dataDir}/.pgpass) - chmod 0600 ${dataDir}/.pgpass + (umask 077; echo "${cfg.replication.primary.hostname}:${builtins.toString cfg.replication.primary.port}:replication:${cfg.replication.username}:''${password}" > ${rootDir}/.pgpass) + chmod 0600 ${rootDir}/.pgpass if [ ! -s "${dataDir}/PG_VERSION" ] then