nixos/postgresql: make postgresql_17 the new default

That's overdue actually, given that it was released last fall.
This commit is contained in:
Maximilian Bosch
2025-06-17 12:33:21 +02:00
parent 83e08f3e3f
commit 950a089393
2 changed files with 8 additions and 2 deletions

View File

@@ -8,6 +8,8 @@
- Secure boot support can now be enabled for the Limine bootloader through {option}`boot.loader.limine.secureBoot.enable`. Bootloader install script signs the bootloader, then kernels are hashed during system rebuild and written to a config. This allows Limine to boot only the kernels installed through NixOS system. - Secure boot support can now be enabled for the Limine bootloader through {option}`boot.loader.limine.secureBoot.enable`. Bootloader install script signs the bootloader, then kernels are hashed during system rebuild and written to a config. This allows Limine to boot only the kernels installed through NixOS system.
- The default PostgreSQL version for new NixOS installations (i.e. with `system.stateVersion >= 25.11`) is v17.
## New Modules {#sec-release-25.11-new-modules} ## New Modules {#sec-release-25.11-new-modules}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. --> <!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

View File

@@ -124,7 +124,9 @@ in
type = types.package; type = types.package;
example = literalExpression "pkgs.postgresql_15"; example = literalExpression "pkgs.postgresql_15";
defaultText = literalExpression '' defaultText = literalExpression ''
if versionAtLeast config.system.stateVersion "24.11" then if versionAtLeast config.system.stateVersion "25.11" then
pkgs.postgresql_17
else if versionAtLeast config.system.stateVersion "24.11" then
pkgs.postgresql_16 pkgs.postgresql_16
else if versionAtLeast config.system.stateVersion "23.11" then else if versionAtLeast config.system.stateVersion "23.11" then
pkgs.postgresql_15 pkgs.postgresql_15
@@ -671,7 +673,9 @@ in
''; '';
base = base =
# XXX Don't forget to keep `defaultText` of `services.postgresql.package` up to date! # XXX Don't forget to keep `defaultText` of `services.postgresql.package` up to date!
if versionAtLeast config.system.stateVersion "24.11" then if versionAtLeast config.system.stateVersion "25.11" then
pkgs.postgresql_17
else if versionAtLeast config.system.stateVersion "24.11" then
pkgs.postgresql_16 pkgs.postgresql_16
else if versionAtLeast config.system.stateVersion "23.11" then else if versionAtLeast config.system.stateVersion "23.11" then
pkgs.postgresql_15 pkgs.postgresql_15