nix-community.nixvim/modules/plugins.nix
2024-09-09 11:50:41 +01:00

15 lines
328 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);
}