nixos/postgresql: rename extraPlugins to extensions

This is the upstream lingo, and it makes everything slightly less
confusing.

(cherry picked from commit 223a6c6ed0)
This commit is contained in:
Martin Weinelt 2024-11-11 23:23:46 +01:00 committed by github-actions[bot]
parent ee202b2125
commit 7d07116532
9 changed files with 13 additions and 13 deletions

View File

@ -41,9 +41,9 @@ let
# works.
base = if cfg.enableJIT then cfg.package.withJIT else cfg.package.withoutJIT;
in
if cfg.extraPlugins == []
if cfg.extensions == []
then base
else base.withPackages cfg.extraPlugins;
else base.withPackages cfg.extensions;
toStr = value:
if true == value then "yes"
@ -60,7 +60,6 @@ let
'';
groupAccessAvailable = versionAtLeast postgresql.version "11.0";
in
{
@ -69,6 +68,7 @@ in
(mkRenamedOptionModule [ "services" "postgresql" "logLinePrefix" ] [ "services" "postgresql" "settings" "log_line_prefix" ])
(mkRenamedOptionModule [ "services" "postgresql" "port" ] [ "services" "postgresql" "settings" "port" ])
(mkRenamedOptionModule [ "services" "postgresql" "extraPlugins" ] [ "services" "postgresql" "extensions" ])
];
###### interface
@ -372,12 +372,12 @@ in
'';
};
extraPlugins = mkOption {
extensions = mkOption {
type = with types; coercedTo (listOf path) (path: _ignorePg: path) (functionTo (listOf path));
default = _: [];
example = literalExpression "ps: with ps; [ postgis pg_repack ]";
description = ''
List of PostgreSQL plugins.
List of PostgreSQL extensions to install.
'';
};

View File

@ -227,7 +227,7 @@ in
ensureClauses.login = true;
}
];
extraPlugins = ps: with ps; [ pgvecto-rs ];
extensions = ps: with ps; [ pgvecto-rs ];
settings = {
shared_preload_libraries = [ "vectors.so" ];
search_path = "\"$user\", public, vectors";

View File

@ -383,7 +383,7 @@ in
ensureDBOwnership = false;
}
];
extraPlugins = ps: with ps; [ postgis ];
extensions = ps: with ps; [ postgis ];
};
# Nginx config taken from support/nginx/mobilizon-release.conf

View File

@ -20,7 +20,7 @@ let
inherit package;
enable = true;
enableJIT = lib.hasInfix "-jit-" package.name;
extraPlugins = ps: [ ps.anonymizer ];
extensions = ps: [ ps.anonymizer ];
settings.shared_preload_libraries = [ "anon" ];
};
};

View File

@ -24,7 +24,7 @@ let
inherit package;
enable = true;
enableJIT = lib.hasInfix "-jit-" package.name;
extraPlugins =
extensions =
ps: with ps; [
pgjwt
pgtap

View File

@ -38,7 +38,7 @@ let
inherit package;
enable = true;
enableJIT = lib.hasInfix "-jit-" package.name;
extraPlugins =
extensions =
ps: with ps; [
pgvecto-rs
];

View File

@ -54,7 +54,7 @@ let
inherit package;
enable = true;
enableJIT = lib.hasInfix "-jit-" package.name;
extraPlugins =
extensions =
ps: with ps; [
timescaledb
timescaledb_toolkit

View File

@ -21,7 +21,7 @@ let
inherit package;
enable = true;
enableJIT = lib.hasInfix "-jit-" package.name;
extraPlugins =
extensions =
ps: with ps; [
tsja
];

View File

@ -17,7 +17,7 @@ let
inherit package;
enable = true;
enableJIT = lib.hasInfix "-jit-" package.name;
extraPlugins = with package.pkgs; [ wal2json ];
extensions = with package.pkgs; [ wal2json ];
settings = {
wal_level = "logical";
max_replication_slots = "10";