nix-community.nixvim/modules/plugins.nix
2025-07-25 16:26:47 +00:00

16 lines
322 B
Nix

{ lib, ... }:
let
inherit (builtins) readDir;
inherit (lib.attrsets) foldlAttrs;
inherit (lib.lists) optional;
by-name = ../plugins/by-name;
in
{
imports = [
../plugins
]
++ foldlAttrs (
prev: name: type:
prev ++ optional (type == "directory") (by-name + "/${name}")
) [ ] (readDir by-name);
}