diff --git a/modules/services/databases/postgresql.nix b/modules/services/databases/postgresql.nix index bd1eaa5e6bd7..de03fe1e46ee 100644 --- a/modules/services/databases/postgresql.nix +++ b/modules/services/databases/postgresql.nix @@ -129,6 +129,14 @@ in default = ""; description = "Additional text to be appended to postgresql.conf."; }; + + 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 =