nixpkgs-suyu/nixos/modules/services
Maximilian Bosch 43dbeae02d
postgresql: pass through JIT-enabled variant of non-JIT postgres and vice versa
This is useful if your postgresql version is dependant on
`system.stateVersion` and not pinned down manually. Then it's not
necessary to find out which version exactly is in use and define
`package` manually, but just stay with what NixOS provides as default:

    $ nix-instantiate -A postgresql
    /nix/store/82fzmb77mz2b787dgj7mn4a8i4f6l6sn-postgresql-14.7.drv
    $ nix-instantiate -A postgresql_jit
    /nix/store/qsjkb72fcrrfpsszrwbsi9q9wgp39m50-postgresql-14.7.drv
    $ nix-instantiate -A postgresql.withJIT
    /nix/store/qsjkb72fcrrfpsszrwbsi9q9wgp39m50-postgresql-14.7.drv
    $ nix-instantiate -A postgresql.withJIT.withoutJIT
    /nix/store/82fzmb77mz2b787dgj7mn4a8i4f6l6sn-postgresql-14.7.drv

I.e. you can use postgresql with JIT (for complex queries only[1]) like
this:

    services.postgresql = {
      enable = true;
      enableJIT = true;
    };

Performing a new override instead of re-using the `_jit`-variants for
that has the nice property that overlays for the original package apply
to the JIT-enabled variant, i.e.

    with import ./. {
      overlays = [
        (self: super: {
          postgresql = super.postgresql.overrideAttrs (_: { fnord = "snens"; });
        })
      ];
    };
    postgresql.withJIT.fnord

still gives the string `snens` whereas `postgresql_jit` doesn't have the
attribute `fnord` in its derivation.

[1] https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-JIT-ABOVE-COST
2023-03-29 08:39:46 +02:00
..
admin
amqp
audio
backup Merge pull request #220656 from oxzi/restic-cache-fix 2023-03-22 00:37:46 +07:00
blockchain/ethereum
cluster Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
computing
continuous-integration nixos/woodpecker: init 2023-03-14 20:31:39 +01:00
databases postgresql: pass through JIT-enabled variant of non-JIT postgres and vice versa 2023-03-29 08:39:46 +02:00
desktops
development nixos/gemstash: init module 2023-03-07 15:56:56 +11:00
display-managers
editors
finance
games
hardware keyd: add keyd service and test 2023-03-22 15:12:29 +01:00
home-automation treewide: deprecate isNull 2023-03-06 22:40:04 +01:00
logging
mail nixos/roundcube: add tmp directory 2023-03-17 19:40:23 +03:00
matrix nixos/doc: fix .well-known example for matrix-synapse 2023-03-19 17:38:32 +01:00
misc Merge pull request #221684 from SuperSandro2000/portunus-localhost 2023-03-20 13:25:34 +01:00
monitoring nixos/prometheus.alertmanagerIrcRelay: init 2023-03-20 15:57:11 +01:00
network-filesystems
networking openssh: fix 'undefined variable' error 2023-03-22 22:38:14 +01:00
printing
scheduling
search solr: drop 2023-03-16 16:17:04 +02:00
security
system Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
torrent
tracing
ttys
video
wayland
web-apps nixos/nextcloud: release notes 2023-03-22 22:37:17 +01:00
web-servers fixup! nixos/minio: activate/restart service on credentials path changes 2023-03-16 09:45:09 -07:00
x11 nixos/hidpi: remove 2023-03-21 13:29:57 +01:00