File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 189
189
( lib . mkIf cfg . configurePgStatStatements [ "pg_stat_statements" ] )
190
190
# TODO: upstream, this probably requires a new entry in passthru to pick if the object name doesn't match the plugin name or there are multiple
191
191
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/databases/postgresql.nix#L76
192
- ( lib . mkIf cfg . preloadAllExtensions ( map lib . getName cfg . finalPackage . installedExtensions ) )
192
+ ( let
193
+ # drop workaround when dropping support for 24.11
194
+ # https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/databases/postgresql.nix#L47-L49
195
+ basePackage = if cfg . enableJIT then cfg . package . withJIT else cfg . package . withoutJIT ;
196
+ postgresPkg = if cfg . extensions == [ ] then basePackage else basePackage . withPackages cfg . extensions ;
197
+ finalPackage = cfg . finalPackage or postgresPkg ;
198
+ in lib . mkIf cfg . preloadAllExtensions ( map lib . getName finalPackage . installedExtensions ) )
193
199
] ;
194
200
upgrade . stopServices = with config . services ; lib . mkMerge [
195
201
( lib . mkIf ( atuin . enable && atuin . database . createLocally ) [ "atuin" ] )
You can’t perform that action at this time.
0 commit comments