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:
@@ -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
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user