Merge: nixos/{libeufin,roundcube,immich}: fix postgresql.package regression (#418514)

This commit is contained in:
Maximilian Bosch
2025-06-22 16:43:20 +02:00
committed by GitHub
3 changed files with 12 additions and 5 deletions
@@ -96,7 +96,9 @@ libeufinComponent:
};
in
{
path = [ config.services.postgresql.package ];
path = [
(if cfg.createLocalDatabase then config.services.postgresql.package else pkgs.postgresql)
];
serviceConfig = {
Type = "oneshot";
DynamicUser = true;
+4 -2
View File
@@ -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 ${
+5 -2
View File
@@ -46,6 +46,9 @@ let
mkOption
mkEnableOption
;
postgresqlPackage =
if cfg.database.enable then config.services.postgresql.package else pkgs.postgresql;
in
{
options.services.immich = {
@@ -265,7 +268,7 @@ in
in
[
''
${lib.getExe' config.services.postgresql.package "psql"} -d "${cfg.database.name}" -f "${sqlFile}"
${lib.getExe' postgresqlPackage "psql"} -d "${cfg.database.name}" -f "${sqlFile}"
''
];
@@ -333,7 +336,7 @@ in
path = [
# gzip and pg_dumpall are used by the backup service
pkgs.gzip
config.services.postgresql.package
postgresqlPackage
];
serviceConfig = commonServiceConfig // {