nixvimConfig/modules/home/default.nix

48 lines
1,022 B
Nix
Raw Normal View History

2024-03-27 23:45:23 +01:00
{
pkgs,
system,
inputs,
config,
lib,
helperLib,
...
}: let
cfg = config.myHomeManager;
2024-05-16 15:09:24 +02:00
# # Taking all modules in ./features and adding enables to them
# features =
# helperLib.extendModules
# (name: {
# extraOptions = {
# myHomeManager.${name}.enable = lib.mkEnableOption "enable my ${name} configuration";
# };
#
# configExtension = config: (lib.mkIf cfg.${name}.enable config);
# })
# (helperLib.filesIn ./features);
2024-05-09 19:41:05 +02:00
2024-03-27 23:45:23 +01:00
# Taking all module bundles in ./bundles and adding bundle.enables to them
bundles =
helperLib.extendModules
(name: {
extraOptions = {
myHomeManager.bundles.${name}.enable = lib.mkEnableOption "enable ${name} module bundle";
};
configExtension = config: (lib.mkIf cfg.bundles.${name}.enable config);
})
(helperLib.filesIn ./bundles);
in {
imports = [
]
2024-05-16 15:09:24 +02:00
# ++ features
2024-03-27 23:45:23 +01:00
++ bundles
;
config = {
myHomeManager = {
bundles.core.enable = lib.mkDefault true;
};
};
}