We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pathExists
1 parent e6c555b commit a389bb6Copy full SHA for a389bb6
modules/plugins.nix
@@ -1,17 +1,15 @@
1
{ lib, ... }:
2
let
3
- inherit (builtins) readDir pathExists;
+ inherit (builtins) readDir;
4
inherit (lib.attrsets) foldlAttrs;
5
- inherit (lib.lists) optional optionals;
+ inherit (lib.lists) optional;
6
by-name = ../plugins/by-name;
7
in
8
{
9
imports =
10
[ ../plugins ]
11
- ++ optionals (pathExists by-name) (
12
- foldlAttrs (
13
- prev: name: type:
14
- prev ++ optional (type == "directory") (by-name + "/${name}")
15
- ) [ ] (readDir by-name)
16
- );
+ ++ foldlAttrs (
+ prev: name: type:
+ prev ++ optional (type == "directory") (by-name + "/${name}")
+ ) [ ] (readDir by-name);
17
}
0 commit comments