refactor: move home-manager module to flake to prevent infinite recursion errors when importing modules

This commit is contained in:
wi11-holdsworth 2025-09-25 17:40:17 +10:00
parent 76027fb711
commit f1cf2988f4
3 changed files with 23 additions and 31 deletions

View file

@ -1,28 +0,0 @@
{
config,
hostName,
inputs,
lib,
userName,
...
}:
let
feature = "home-manager";
in
{
config = lib.mkIf config.${feature}.enable {
home-manager = {
users.${userName} = import ../../../hosts/${hostName}/home.nix;
backupFileExtension = "backup";
extraSpecialArgs = {
inherit userName;
};
useGlobalPkgs = true;
useUserPackages = true;
};
};
imports = [ inputs.home-manager.nixosModules.home-manager ];
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
}