mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
nixos/roundcube: fix postgresql.package regression
`config.services.postgresql.package` is now only available when the
PostgreSQL module is actually enabled. If we're not using the local
database, we'll need to fallback to the latest postgresql version, since
we don't know about the remote version.
(cherry picked from commit e780b064a8)
This commit is contained in:
committed by
github-actions[bot]
parent
ea6f7c1587
commit
25e4fe68b1
@@ -272,7 +272,7 @@ in
|
||||
];
|
||||
|
||||
systemd.services.roundcube-setup = lib.mkMerge [
|
||||
(lib.mkIf (cfg.database.host == "localhost") {
|
||||
(lib.mkIf localDB {
|
||||
requires = [ "postgresql.service" ];
|
||||
after = [ "postgresql.service" ];
|
||||
})
|
||||
@@ -281,7 +281,9 @@ in
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
path = [ config.services.postgresql.package ];
|
||||
path = [
|
||||
(if localDB then config.services.postgresql.package else pkgs.postgresql)
|
||||
];
|
||||
script =
|
||||
let
|
||||
psql = "${lib.optionalString (!localDB) "PGPASSFILE=${cfg.database.passwordFile}"} psql ${
|
||||
|
||||
Reference in New Issue
Block a user