nixos/postgresql: take extraPlugins packageset from package option
This allows to reuse the extraPlugins option in other context's for example an upgrade script.
This commit is contained in:
@@ -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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user