aboutsummaryrefslogtreecommitdiff
path: root/modules/apps
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-06-04 22:31:27 +0200
committerIgor Pashev <pashev.igor@gmail.com>2019-06-04 22:35:37 +0200
commit2ab9b4ce75fbd12365196484415e0d2704795613 (patch)
tree2fd10d5abb0719584609fb5bef7a4617fe078fa3 /modules/apps
parent383420cac7eb0398ef82651242762240ddcda1ea (diff)
downloadnixsap-2ab9b4ce75fbd12365196484415e0d2704795613.tar.gz
Let specify a package for pgbackup
Diffstat (limited to 'modules/apps')
-rw-r--r--modules/apps/pgbackup.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/apps/pgbackup.nix b/modules/apps/pgbackup.nix
index 8eb0726..a0c1f56 100644
--- a/modules/apps/pgbackup.nix
+++ b/modules/apps/pgbackup.nix
@@ -8,7 +8,7 @@ let
findFirst hasPrefix mapAttrsToList mkIf
mkOption optionalString removeSuffix ;
inherit (lib.types)
- bool enum int listOf nullOr path str submodule ;
+ bool enum int listOf nullOr package path str submodule ;
cfg = config.nixsap.apps.pgbackup;
privateDir = "/run/pgbackup";
@@ -80,7 +80,7 @@ let
# XXX: Use the latest pg_dump:
pg_dump = pkgs.writeBashScript name ''
${optionalString (cfg.pgpass != null) "export PGPASSFILE='${cfg.pgpass}'"}
- exec ${pkgs.postgresql95}/bin/pg_dump \
+ exec ${cfg.package}/bin/pg_dump \
${concatMapAttrsSep " " mkArg args} \
"$@"
'';
@@ -256,6 +256,13 @@ let
in {
options.nixsap.apps.pgbackup = {
+
+ package = mkOption {
+ description = "PostgreSQL package providing pg_dump";
+ type = package;
+ default = pkgs.postgresql;
+ };
+
user = mkOption {
description = "User to run as";
default = "pgbackup";