diff --git a/modules/plugins.nix b/modules/plugins.nix index fdb64b92..a0d0a674 100644 --- a/modules/plugins.nix +++ b/modules/plugins.nix @@ -1,17 +1,15 @@ { lib, ... }: let - inherit (builtins) readDir pathExists; + inherit (builtins) readDir; inherit (lib.attrsets) foldlAttrs; - inherit (lib.lists) optional optionals; + inherit (lib.lists) optional; by-name = ../plugins/by-name; in { imports = [ ../plugins ] - ++ optionals (pathExists by-name) ( - foldlAttrs ( - prev: name: type: - prev ++ optional (type == "directory") (by-name + "/${name}") - ) [ ] (readDir by-name) - ); + ++ foldlAttrs ( + prev: name: type: + prev ++ optional (type == "directory") (by-name + "/${name}") + ) [ ] (readDir by-name); }