refactor: home modules

This commit is contained in:
Ryan Yin
2024-03-13 13:32:13 +08:00
parent 5234fd7279
commit 093866a2aa
8 changed files with 32 additions and 27 deletions

View File

@@ -4,7 +4,7 @@
system,
genSpecialArgs,
nixos-modules,
home-module ? null,
home-modules ? [],
myvars,
...
}: let
@@ -26,7 +26,7 @@ in
}
]
++ (
lib.optionals (home-module != null)
lib.optionals ((lib.lists.length home-modules) > 0)
[
home-manager.nixosModules.home-manager
{
@@ -34,7 +34,7 @@ in
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users."${myvars.username}" = home-module;
home-manager.users."${myvars.username}".imports = home-modules;
}
]
);