From 8bf1e138bc2a866637681b2dac07f82eb2f5e98e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 10 Mar 2025 18:06:32 +0100 Subject: [PATCH] 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. --- nixos/modules/services/databases/postgresql.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index 7963b4152fe6d3..530c4a036fad86 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -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 = ''