Skip to content

Commit 8bf1e13

Browse files
committed
nixos/postgresql: fix merging of shared_preload_libraries option
Closes #386804 The issue with coercing to `types.str` is that it's not mergeable, so any declarations will result in an eval error like this: error: The option `interactive.nodes.tmp.services.postgresql.settings.shared_preload_libraries' has conflicting definition values: - In `/home/ma27/Projects/nixpkgs-hack/tmp.nix@node-tmp': "foo" - In `/home/ma27/Projects/nixpkgs-hack/tmp.nix@node-tmp': "bar2" Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions. Using a mergeable type (`types.comma`, i.e. a string, where all declarations get joined with a comma as delimiter) fixes the problem.
1 parent 3847faf commit 8bf1e13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nixos/modules/services/databases/postgresql.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ in
439439
]);
440440
options = {
441441
shared_preload_libraries = mkOption {
442-
type = nullOr (coercedTo (listOf str) (concatStringsSep ", ") str);
442+
type = nullOr (coercedTo (listOf str) (concatStringsSep ",") commas);
443443
default = null;
444444
example = literalExpression ''[ "auto_explain" "anon" ]'';
445445
description = ''

0 commit comments

Comments
 (0)