1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-19 07:59:24 +03:00

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.
This commit is contained in:
Maximilian Bosch 2025-03-10 18:06:32 +01:00
parent 3847fafbbc
commit 8bf1e138bc
No known key found for this signature in database

View file

@ -439,7 +439,7 @@ in
]);
options = {
shared_preload_libraries = mkOption {
type = nullOr (coercedTo (listOf str) (concatStringsSep ", ") str);
type = nullOr (coercedTo (listOf str) (concatStringsSep ",") commas);
default = null;
example = literalExpression ''[ "auto_explain" "anon" ]'';
description = ''