zsh: merge plugin home.file entries with mergeAttrsList

Plugin source links were combined with a linear foldl' of //. mergeAttrsList
performs the equivalent shallow merge and scales with the plugin count.
This commit is contained in:
Austin Horstman
2026-06-17 13:04:43 -05:00
parent cbbddc4a6f
commit b3f454e5c2
+1 -1
View File
@@ -108,7 +108,7 @@ in
) options.programs.zsh.plugins.definitionsWithLocations;
home.file = lib.mkIf cfg.enable (
lib.foldl' (a: b: a // b) { } (
lib.mergeAttrsList (
map (plugin: { "${pluginsDir}/${plugin.name}".source = plugin.src; }) cfg.plugins
)
);