update
This commit is contained in:
parent
e7ac68bf73
commit
816abd49dc
1 changed files with 6 additions and 7 deletions
13
flake.nix
13
flake.nix
|
@ -350,7 +350,8 @@
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
dataDir = "/var/lib/postgresql/15";
|
rootDir = "/var/lib/postgresql";
|
||||||
|
dataDir = "${rootDir}/15";
|
||||||
|
|
||||||
pgbackrestEnvironment =
|
pgbackrestEnvironment =
|
||||||
{
|
{
|
||||||
|
@ -423,13 +424,13 @@
|
||||||
uid = config.ids.uids.postgres;
|
uid = config.ids.uids.postgres;
|
||||||
group = "postgres";
|
group = "postgres";
|
||||||
description = "PostgreSQL Server";
|
description = "PostgreSQL Server";
|
||||||
home = "/var/lib/postgresql/15";
|
home = dataDir;
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /var/lib/postgresql 0750 postgres postgres -"
|
"d ${rootDir} 0750 postgres postgres -"
|
||||||
"d /var/lib/postgresql/15 0700 postgres postgres -"
|
"d ${dataDir} 0700 postgres postgres -"
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.postgresql =
|
systemd.services.postgresql =
|
||||||
|
@ -576,9 +577,7 @@
|
||||||
--slot=${config.networking.hostName} \
|
--slot=${config.networking.hostName} \
|
||||||
--create-slot \
|
--create-slot \
|
||||||
--wal-method=stream \
|
--wal-method=stream \
|
||||||
--host=${cfg.replication.primary.hostname} \
|
--dbname=postgresql://${cfg.replication.username}@${cfg.replication.primary.hostname}:${builtins.toString cfg.replication.primary.port}/postgresql?sslmode=require \
|
||||||
--port=${builtins.toString cfg.replication.primary.port} \
|
|
||||||
--username=${cfg.replication.username} \
|
|
||||||
--no-password
|
--no-password
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue