1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 10:47:19 +00:00

fix: initdb missing data area directory

Use `PGDATA` environment variable instead of `-D` to maintain
consistency with NixOS module.

Co-Authored-By: Michael Hoang <enzime@users.noreply.github.com>
This commit is contained in:
Francesc Esplugas 2023-10-16 23:31:15 +02:00 committed by Michael Hoang
parent 8b6ea26d5d
commit b2dff2033d

View file

@ -237,10 +237,10 @@ in
for an overview of `postgresql.conf`.
::: {.note}
String values will automatically be enclosed in single quotes. Single quotes will be
escaped with two single quotes as described by the upstream documentation linked above.
:::
'';
example = literalExpression ''
@ -355,11 +355,14 @@ in
"${cfg.dataDir}/recovery.conf"
''}
exec ${postgresql}/bin/postgres -D ${cfg.dataDir}
exec ${postgresql}/bin/postgres
'';
serviceConfig.KeepAlive = true;
serviceConfig.RunAtLoad = true;
serviceConfig.EnvironmentVariables = {
PGDATA = cfg.dataDir;
};
};
};