diff --git a/nixos/doc/manual/release-notes/rl-2511.section.md b/nixos/doc/manual/release-notes/rl-2511.section.md index d554f60a68c2..295d9ede7118 100644 --- a/nixos/doc/manual/release-notes/rl-2511.section.md +++ b/nixos/doc/manual/release-notes/rl-2511.section.md @@ -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. +- 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} diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index dc8b05b46458..2c0a8f5d4106 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -124,7 +124,9 @@ in type = types.package; example = literalExpression "pkgs.postgresql_15"; 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 else if versionAtLeast config.system.stateVersion "23.11" then pkgs.postgresql_15 @@ -671,7 +673,9 @@ in ''; base = # 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 else if versionAtLeast config.system.stateVersion "23.11" then pkgs.postgresql_15