From 816abd49dcd88e4ab21f28cf6b95c940be517bfd Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Thu, 10 Aug 2023 15:57:56 -0500 Subject: [PATCH] update --- flake.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index f2910e8..9e185a4 100644 --- a/flake.nix +++ b/flake.nix @@ -350,7 +350,8 @@ '' ); - dataDir = "/var/lib/postgresql/15"; + rootDir = "/var/lib/postgresql"; + dataDir = "${rootDir}/15"; pgbackrestEnvironment = { @@ -423,13 +424,13 @@ uid = config.ids.uids.postgres; group = "postgres"; description = "PostgreSQL Server"; - home = "/var/lib/postgresql/15"; + home = dataDir; useDefaultShell = true; }; systemd.tmpfiles.rules = [ - "d /var/lib/postgresql 0750 postgres postgres -" - "d /var/lib/postgresql/15 0700 postgres postgres -" + "d ${rootDir} 0750 postgres postgres -" + "d ${dataDir} 0700 postgres postgres -" ]; systemd.services.postgresql = @@ -576,9 +577,7 @@ --slot=${config.networking.hostName} \ --create-slot \ --wal-method=stream \ - --host=${cfg.replication.primary.hostname} \ - --port=${builtins.toString cfg.replication.primary.port} \ - --username=${cfg.replication.username} \ + --dbname=postgresql://${cfg.replication.username}@${cfg.replication.primary.hostname}:${builtins.toString cfg.replication.primary.port}/postgresql?sslmode=require \ --no-password fi