refactor(hmModules): moved home-manager to module
This commit is contained in:
parent
0b393ab562
commit
cb42df54ec
4 changed files with 36 additions and 22 deletions
33
modules/hm/default.nix
Normal file
33
modules/hm/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
specialArgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "hmModules";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = specialArgs;
|
||||
users.rafiq.home = {
|
||||
username = "rafiq";
|
||||
homeDirectory = "/home/rafiq";
|
||||
stateVersion = "25.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue