nvf/modules/modules.nix

62 lines
983 B
Nix
Raw Normal View History

{
pkgs,
lib,
check ? true,
}: let
inherit (lib.modules) mkDefault;
inherit (lib.lists) concatLists;
core = map (p: ./core + "/${p}") [
"build"
"warnings"
];
neovim = map (p: ./neovim + "/${p}") [
"basic"
"mappings"
];
plugins = map (p: ./plugins + "/${p}") [
"assistant"
"autopairs"
"comments"
"completion"
"dashboard"
"debugger"
"filetree"
"git"
"languages"
"lsp"
"minimap"
"notes"
"projects"
"rich-presence"
"session"
"snippets"
"statusline"
"tabline"
"terminal"
"theme"
"treesitter"
"ui"
"utility"
"visuals"
];
allModules = concatLists [core neovim plugins];
pkgsModule = {config, ...}: {
config = {
2023-11-06 09:33:38 +00:00
_module = {
inherit check;
args = {
baseModules = allModules;
pkgsPath = mkDefault pkgs.path;
pkgs = mkDefault pkgs;
2023-11-06 09:33:38 +00:00
};
};
};
};
in
allModules ++ [pkgsModule]