about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--home/default.nix3
-rw-r--r--lib/mk_home.nix26
2 files changed, 15 insertions, 14 deletions
diff --git a/home/default.nix b/home/default.nix
index ce303b4..f8ce8fe 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -4,8 +4,7 @@
   "zach@alpha" = self.lib.mkHome {
     username = "zach";
     hostname = "alpha";
-    system = "x86_64-linux";
-    pkgs = import unstable { system = "x86_64-linux"; overlays = with inputs; [ chaotic-nixpkgs.overlay rust.overlay ]; };
+    pkgs = import unstable { system = "x86_64-linux"; overlays = with inputs; [ chaotic-nixpkgs.overlay rust.overlays.default ]; };
 
     extraModules = [
       ./profiles/populate.nix
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;
 }