removed preStart step

This commit is contained in:
2026-03-30 11:28:53 -04:00
parent 8d1c1fc628
commit 93fc700fa2
2 changed files with 0 additions and 13 deletions

View File

@@ -5,18 +5,6 @@ in
{
networking.firewall.allowedTCPPorts = [ 5432 ];
# Symlink pg_wal to a ZFS dataset on the special (metadata) vdev for fast WAL writes
systemd.services.postgresql.preStart = pkgs.lib.mkAfter ''
if [ ! -L "${vars.database}/postgres/pg_wal" ] && [ -d "${vars.database}/postgres/pg_wal" ]; then
echo "Moving pg_wal to ${vars.postgres_wal} and creating symlink..."
cp -a "${vars.database}/postgres/pg_wal/." "${vars.postgres_wal}/"
rm -rf "${vars.database}/postgres/pg_wal"
ln -s "${vars.postgres_wal}" "${vars.database}/postgres/pg_wal"
elif [ ! -e "${vars.database}/postgres/pg_wal" ]; then
ln -s "${vars.postgres_wal}" "${vars.database}/postgres/pg_wal"
fi
'';
services.postgresql = {
enable = true;
package = pkgs.postgresql_17_jit;