postgresql: Allow to specify recoveryConfig.

This is needed for streaming replication in PostgreSQL 9.0 and higher.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2013-07-14 05:04:10 +02:00
parent d5f0183153
commit ab08c8a1bb
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961

View File

@ -129,6 +129,14 @@ in
default = "";
description = "Additional text to be appended to <filename>postgresql.conf</filename>.";
};
recoveryConfig = mkOption {
default = null;
type = types.nullOr types.string;
description = ''
Values to put into recovery.conf file.
'';
};
};
};
@ -177,7 +185,11 @@ in
touch "${cfg.dataDir}/.first_startup"
fi
ln -sfn ${configFile} ${cfg.dataDir}/postgresql.conf
ln -sfn "${configFile}" "${cfg.dataDir}/postgresql.conf"
${optionalString (cfg.recoveryConfig != null) ''
ln -sfn "${pkgs.writeText "recovery.conf" cfg.recoveryConfig}" \
"${cfg.dataDir}/recovery.conf"
''}
''; # */
serviceConfig =