nixos/postgresql: fix enableJIT = false

The enableJIT = true case was fixed in #221851 or
e2fb651752 respectively.

However this did not take the case into consideration, when doing this:

    services.postgresql = {
      enable = true;
      enableJIT = false;
      package = pkgs.postgresql_15_jit;
    };

If enableJIT is treated as the source of truth, then this should indeed
cause JIT to be disabled, which this commit does.
This commit is contained in:
Wolfgang Walther 2024-03-10 18:16:41 +01:00
parent c6017567e0
commit 1682b4cc39
No known key found for this signature in database
GPG key ID: B39893FA5F65CAE1

View file

@ -14,7 +14,7 @@ let
# package = pkgs.postgresql_<major>;
# };
# works.
base = if cfg.enableJIT then cfg.package.withJIT else cfg.package;
base = if cfg.enableJIT then cfg.package.withJIT else cfg.package.withoutJIT;
in
if cfg.extraPlugins == []
then base