nixos/immich: assert postgresql is below v17 (#418962)
This commit is contained in:
@@ -231,6 +231,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 = ''
|
||||
|
||||
Reference in New Issue
Block a user