split home-manager into their own submodules

This commit is contained in:
Danilo Reyes
2026-03-16 15:49:43 -06:00
parent 14eed4f7f6
commit 28c8db6cb7
43 changed files with 1011 additions and 626 deletions

View File

@@ -0,0 +1,36 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
python = import ./common.nix { inherit pkgs; };
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"python"
];
};
cfg = config.my.dev.python;
in
{
options.my.dev.python.enable = lib.mkEnableOption "Install Python tools globally";
config = lib.mkMerge [
{
my.dev.python.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = python.packages;
xdg.configFile."python/pythonrc".source = ../../../dotfiles/pythonrc;
home.sessionVariables.PYTHONSTARTUP = "\${XDG_CONFIG_HOME}/python/pythonrc";
})
];
}