refactor: move home-manager module to flake to prevent infinite recursion errors when importing modules
This commit is contained in:
parent
76027fb711
commit
f1cf2988f4
3 changed files with 23 additions and 31 deletions
|
|
@ -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}";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue