Skip to content

Commit

Permalink
plugins/by-name: remove pathExists check
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Sep 9, 2024
1 parent 6debe93 commit 48e9af5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions modules/plugins.nix
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit 48e9af5

Please sign in to comment.