nixvimConfig/modules/home/default.nix

48 lines
1,014 B
Nix
Raw Normal View History

2024-07-03 00:38:20 +02:00
{
pkgs,
2024-03-27 23:45:23 +01:00
system,
inputs,
2024-07-03 02:27:30 +02:00
outputs,
2024-03-27 23:45:23 +01:00
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
2024-08-15 16:54:00 +02:00
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 {
2024-07-03 00:38:20 +02:00
imports =
[
]
2024-08-15 16:54:00 +02:00
++ features
2024-07-03 00:38:20 +02:00
++ bundles;
2024-03-27 23:45:23 +01:00
config = {
myHomeManager = {
bundles.core.enable = lib.mkDefault true;
};
};
}