nixos/immich: assert postgresql is below v17
We recently bumped the default PostgreSQL version to v17 in the NixOS module. This breaks immich, which still needs PostgreSQL 16.
This commit is contained in:
parent
43558d56a7
commit
cb30307559
@ -228,6 +228,11 @@ in
|
||||
assertion = !isPostgresUnixSocket -> cfg.secretsFile != null;
|
||||
message = "A secrets file containing at least the database password must be provided when unix sockets are not used.";
|
||||
}
|
||||
{
|
||||
# When removing this assertion, please adjust the nixosTests accordingly.
|
||||
assertion = cfg.database.enable -> lib.versionOlder config.services.postgresql.package.version "17";
|
||||
message = "Immich doesn't support PostgreSQL 17+, yet.";
|
||||
}
|
||||
];
|
||||
|
||||
services.postgresql = mkIf cfg.database.enable {
|
||||
|
@ -30,6 +30,9 @@
|
||||
port = 8002;
|
||||
settings.ipp.responseHeaders."X-NixOS" = "Rules";
|
||||
};
|
||||
|
||||
# TODO: Remove when PostgreSQL 17 is supported.
|
||||
services.postgresql.package = pkgs.postgresql_16;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
@ -18,6 +18,9 @@
|
||||
enable = true;
|
||||
environment.IMMICH_LOG_LEVEL = "verbose";
|
||||
};
|
||||
|
||||
# TODO: Remove when PostgreSQL 17 is supported.
|
||||
services.postgresql.package = pkgs.postgresql_16;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user