mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
nixos/immich: 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 62d2b6d593)
This commit is contained in:
committed by
github-actions[bot]
parent
25e4fe68b1
commit
e5cb9a5ba4
@@ -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 // {
|
||||
|
||||
Reference in New Issue
Block a user