1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00
nixvim/modules/plugins.nix
2025-11-07 21:06:29 -03: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
];
}