From 60d407b2094cd718b86de1360c9a44d92638d182 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 25 Oct 2015 16:02:11 +0100 Subject: [PATCH] nixos/postgresql: Fix execution of initialScript. Regression introduced by b21fd5d066baadb06ca8e9a2accfcb4e94c60a09. The initialScript is only executed whenever there is a .first-startup in the dataDir, so silently dropping the file essentially breaks initialScript functionality. Signed-off-by: aszlig --- nixos/modules/services/databases/postgresql.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index bae088c6610..06b9c3fbf4c 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -202,6 +202,8 @@ in # For non-root operation. initdb fi + # See postStart! + touch "${cfg.dataDir}/.first_startup" fi ln -sfn "${configFile}" "${cfg.dataDir}/postgresql.conf"