nixos/immich: assert postgresql is below v17 (#418962)

This commit is contained in:
Wolfgang Walther
2025-06-22 16:19:10 +00:00
committed by GitHub
3 changed files with 11 additions and 0 deletions
@@ -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 = ''
+3
View File
@@ -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 = ''