1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-09 20:16:07 +01:00
nixvim/modules/plugins.nix
2025-11-09 12:29:06 +00:00

22 lines
394 B
Nix

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