diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mk_home.nix | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/mk_home.nix b/lib/mk_home.nix index 6682d78..b2f87dc 100644 --- a/lib/mk_home.nix +++ b/lib/mk_home.nix @@ -1,16 +1,9 @@ { self, home-manager, ... } @ inputs: -{ username, hostname, system ? "x86_64-linux", pkgs, version, extraModules ? null }: +{ username, hostname, pkgs, version, extraModules ? null }: let entrypoint = "${self}/home/${hostname}/${username}.nix"; -in -home-manager.lib.homeManagerConfiguration { - inherit username system; - homeDirectory = "/home/${username}"; - stateVersion = version; - pkgs = pkgs; - - configuration = { lib, ... }: { + defaultModule = { lib, ... }: { _module.args.inputs = self.inputs; _module.args.self = self; @@ -20,8 +13,17 @@ home-manager.lib.homeManagerConfiguration { json.enable = false; }; - imports = [ - entrypoint - ] ++ lib.optionals (extraModules != null) extraModules; + home = { + inherit username; + homeDirectory = "/home/${username}"; + stateVersion = version; + }; }; +in +home-manager.lib.homeManagerConfiguration { + pkgs = pkgs; + modules = [ + defaultModule + entrypoint + ] ++ pkgs.lib.optionals (extraModules != null) extraModules; } |