Merge pull request #257503 from SuperSandro2000/postgres-extraPlugins
nixos/postgresql: take extraPlugins packageset from package option
This commit is contained in:
commit
47aff944e4
|
@ -40,6 +40,9 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
|||
|
||||
- Cinnamon has been updated to 6.0. Please beware that the [Wayland session](https://blog.linuxmint.com/?p=4591) is still experimental in this release.
|
||||
|
||||
- `services.postgresql.extraPlugins` changed its type from just a list of packages to also a function that returns such a list.
|
||||
For example a config line like ``services.postgresql.extraPlugins = with pkgs.postgresql_11.pkgs; [ postgis ];`` is recommended to be changed to ``services.postgresql.extraPlugins = ps: with ps; [ postgis ];``;
|
||||
|
||||
- Programs written in [Nim](https://nim-lang.org/) are built with libraries selected by lockfiles.
|
||||
The `nimPackages` and `nim2Packages` sets have been removed.
|
||||
See https://nixos.org/manual/nixpkgs/unstable#nim for more information.
|
||||
|
|
|
@ -258,7 +258,7 @@ postgresql_15.pkgs.pg_partman postgresql_15.pkgs.pgroonga
|
|||
To add plugins via NixOS configuration, set `services.postgresql.extraPlugins`:
|
||||
```
|
||||
services.postgresql.package = pkgs.postgresql_12;
|
||||
services.postgresql.extraPlugins = with pkgs.postgresql_12.pkgs; [
|
||||
services.postgresql.extraPlugins = ps: with ps; [
|
||||
pg_repack
|
||||
postgis
|
||||
];
|
||||
|
|
|
@ -18,7 +18,7 @@ let
|
|||
in
|
||||
if cfg.extraPlugins == []
|
||||
then base
|
||||
else base.withPackages (_: cfg.extraPlugins);
|
||||
else base.withPackages cfg.extraPlugins;
|
||||
|
||||
toStr = value:
|
||||
if true == value then "yes"
|
||||
|
@ -391,12 +391,11 @@ in
|
|||
};
|
||||
|
||||
extraPlugins = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
example = literalExpression "with pkgs.postgresql_15.pkgs; [ postgis pg_repack ]";
|
||||
type = with types; coercedTo (listOf path) (path: _ignorePg: path) (functionTo (listOf path));
|
||||
default = _: [];
|
||||
example = literalExpression "ps: with ps; [ postgis pg_repack ]";
|
||||
description = lib.mdDoc ''
|
||||
List of PostgreSQL plugins. PostgreSQL version for each plugin should
|
||||
match version for `services.postgresql.package` value.
|
||||
List of PostgreSQL plugins.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ in
|
|||
ensureDBOwnership = false;
|
||||
}
|
||||
];
|
||||
extraPlugins = with postgresql.pkgs; [ postgis ];
|
||||
extraPlugins = ps: with ps; [ postgis ];
|
||||
};
|
||||
|
||||
# Nginx config taken from support/nginx/mobilizon-release.conf
|
||||
|
|
|
@ -11,7 +11,7 @@ with pkgs; {
|
|||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
extraPlugins = [ pgjwt pgtap ];
|
||||
extraPlugins = ps: with ps; [ pgjwt pgtap ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,10 +9,10 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.postgresql = let mypg = pkgs.postgresql; in {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = mypg;
|
||||
extraPlugins = with mypg.pkgs; [
|
||||
package = pkgs.postgresql;
|
||||
extraPlugins = ps: with ps; [
|
||||
postgis
|
||||
];
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@ let
|
|||
services.postgresql = {
|
||||
enable = true;
|
||||
package = postgresql-package;
|
||||
extraPlugins = with postgresql-package.pkgs; [
|
||||
extraPlugins = ps: with ps; [
|
||||
timescaledb
|
||||
promscale_extension
|
||||
];
|
||||
|
|
|
@ -52,7 +52,7 @@ let
|
|||
services.postgresql = {
|
||||
enable = true;
|
||||
package = postgresql-package;
|
||||
extraPlugins = with postgresql-package.pkgs; [
|
||||
extraPlugins = ps: with ps; [
|
||||
timescaledb
|
||||
timescaledb_toolkit
|
||||
];
|
||||
|
|
|
@ -11,7 +11,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
|||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
extraPlugins = with config.services.postgresql.package.pkgs; [
|
||||
extraPlugins = ps: with ps; [
|
||||
tsja
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user