summary refs log tree commit diff
path: root/nixos/modules/services/databases/postgresql.nix
diff options
context:
space:
mode:
authorPascal Bach <pascal.bach@nextrem.ch>2020-08-06 19:45:14 +0200
committerPascal Bach <pascal.bach@nextrem.ch>2020-08-06 19:47:17 +0200
commitcee4e14bdf7302e48d313264c0c34a418320bba5 (patch)
tree3773811b5bd6a207e4c4e97b89b6b59546b3c45b /nixos/modules/services/databases/postgresql.nix
parent0db954535591921e67fad48b65fc1f73cd6516d2 (diff)
downloadnixpkgs-cee4e14bdf7302e48d313264c0c34a418320bba5.tar
nixpkgs-cee4e14bdf7302e48d313264c0c34a418320bba5.tar.gz
nixpkgs-cee4e14bdf7302e48d313264c0c34a418320bba5.tar.bz2
nixpkgs-cee4e14bdf7302e48d313264c0c34a418320bba5.tar.lz
nixpkgs-cee4e14bdf7302e48d313264c0c34a418320bba5.tar.xz
nixpkgs-cee4e14bdf7302e48d313264c0c34a418320bba5.tar.zst
nixpkgs-cee4e14bdf7302e48d313264c0c34a418320bba5.zip
nixos/postgresql: fix setup script
The missing () caused parts of the escripts to be added to the
ExecStartPost line instead of inside the script.

This caused postgresql start to fail under certain conditions.
Diffstat (limited to 'nixos/modules/services/databases/postgresql.nix')
-rw-r--r--nixos/modules/services/databases/postgresql.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index 59c9325ca90..3e16b5907dd 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -333,7 +333,7 @@ in
             # Wait for PostgreSQL to be ready to accept connections.
             ExecStartPost =
               let
-                setupScript = pkgs.writeScript "postgresql-setup" ''
+                setupScript = pkgs.writeScript "postgresql-setup" (''
                   #!${pkgs.runtimeShell} -e
 
                   PSQL="${pkgs.utillinux}/bin/runuser -u ${cfg.superUser} -- psql --port=${toString cfg.port}"
@@ -360,7 +360,7 @@ in
                       $PSQL -tAc 'GRANT ${permission} ON ${database} TO "${user.name}"'
                     '') user.ensurePermissions)}
                   '') cfg.ensureUsers}
-                '';
+                '');
               in
                 "+${setupScript}";
           }