summaryrefslogtreecommitdiff
path: root/modules/services/postgresql/default.nix
diff options
context:
space:
mode:
authorMichael Hoang <Enzime@users.noreply.github.com>2024-10-13 08:39:35 +1100
committerGitHub <noreply@github.com>2024-10-13 08:39:35 +1100
commitfd0e3ed30b75ddf7f3d94829d80a078b413b6244 (patch)
treea23dbd92494d3320a99def933973f6ee6e65bfba /modules/services/postgresql/default.nix
parent48b50b3b137be5cfb9f4d006835ce7c3fe558ccc (diff)
parentb2dff2033d72b7e9ed9a3a135327fead70c61b08 (diff)
Merge pull request #794 from fesplugas/patch-1
fix: postgresql service initdb
Diffstat (limited to 'modules/services/postgresql/default.nix')
-rw-r--r--modules/services/postgresql/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/services/postgresql/default.nix b/modules/services/postgresql/default.nix
index e063944..64dfad4 100644
--- a/modules/services/postgresql/default.nix
+++ b/modules/services/postgresql/default.nix
@@ -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;
+ };
};
};