summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2024-04-24 21:33:54 +0000
committerGitHub <noreply@github.com>2024-04-24 21:33:54 +0000
commite59f7ab9ef41b55560651468218178e745394363 (patch)
tree126e2fce44304d052445f760621e4c3154ae2450 /nixos
parentbbe1fb6181e0864c65e2b834968d32eceacaf127 (diff)
parentbdde259862873eaab23d1b69565e93eafb3b6d73 (diff)
Merge pull request #278152 from ckiee/roundcube-fix-postgresql-package-ref
nixos/roundcube: eliminate extra postgres package for local databases
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/mail/roundcube.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix
index dfbdff7fb011..78f627d33e2d 100644
--- a/nixos/modules/services/mail/roundcube.nix
+++ b/nixos/modules/services/mail/roundcube.nix
@@ -247,14 +247,15 @@ in
(mkIf (cfg.database.host == "localhost") {
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
- path = [ config.services.postgresql.package ];
})
{
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
+
+ path = [ config.services.postgresql.package ];
script = let
- psql = "${lib.optionalString (!localDB) "PGPASSFILE=${cfg.database.passwordFile}"} ${pkgs.postgresql}/bin/psql ${lib.optionalString (!localDB) "-h ${cfg.database.host} -U ${cfg.database.username} "} ${cfg.database.dbname}";
+ psql = "${lib.optionalString (!localDB) "PGPASSFILE=${cfg.database.passwordFile}"} psql ${lib.optionalString (!localDB) "-h ${cfg.database.host} -U ${cfg.database.username} "} ${cfg.database.dbname}";
in
''
version="$(${psql} -t <<< "select value from system where name = 'roundcube-version';" || true)"