0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-19 16:40:32 +03:00

nixos/postgresql: warn about unstable status

This commit is contained in:
Kamil Monicz 2025-07-03 11:40:18 +02:00
parent abc5cff372
commit 82248a6f7a
No known key found for this signature in database
GPG key ID: F9FB19F1C1DC9C23

View file

@ -637,6 +637,20 @@ in
config = mkIf cfg.enable {
warnings = (
let
unstableState =
if lib.hasInfix "beta" cfg.package.version then
"in beta"
else if lib.hasInfix "rc" cfg.package.version then
"a release candidate"
else
null;
in
lib.optional (unstableState != null)
"PostgreSQL ${lib.versions.major cfg.package.version} is currently ${unstableState}, and is not advised for use in production environments."
);
assertions = map (
{ name, ensureDBOwnership, ... }:
{