mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 04:58:19 -04:00
removed preStart step
This commit is contained in:
@@ -5,18 +5,6 @@ in
|
|||||||
{
|
{
|
||||||
networking.firewall.allowedTCPPorts = [ 5432 ];
|
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 = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.postgresql_17_jit;
|
package = pkgs.postgresql_17_jit;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ in
|
|||||||
{
|
{
|
||||||
inherit zfs_media zfs_storage zfs_scratch;
|
inherit zfs_media zfs_storage zfs_scratch;
|
||||||
database = "${zfs_media}/database";
|
database = "${zfs_media}/database";
|
||||||
postgres_wal = "${zfs_media}/postgres-wal";
|
|
||||||
docker = "${zfs_media}/docker";
|
docker = "${zfs_media}/docker";
|
||||||
docker_configs = "${zfs_media}/docker/configs";
|
docker_configs = "${zfs_media}/docker/configs";
|
||||||
home_assistant = "${zfs_media}/home_assistant";
|
home_assistant = "${zfs_media}/home_assistant";
|
||||||
|
|||||||
Reference in New Issue
Block a user