about summary refs log tree commit diff
path: root/lib/mk_home.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mk_home.nix')
-rw-r--r--lib/mk_home.nix49
1 files changed, 25 insertions, 24 deletions
diff --git a/lib/mk_home.nix b/lib/mk_home.nix
index 925fdbe..8e63324 100644
--- a/lib/mk_home.nix
+++ b/lib/mk_home.nix
@@ -1,29 +1,30 @@
 { self, home-manager, ... } @ inputs:
+{
+  mkHome = { username, hostname, pkgs, version, extraModules ? null }:
+    let
+      entrypoint = "${self}/home/configs/${hostname}/${username}.nix";
+      defaultModule = { lib, config, ... }: {
+        _module.args.inputs = self.inputs;
+        _module.args.self = self;
 
-{ username, hostname, pkgs, version, extraModules ? null }:
-let
-  entrypoint = "${self}/home/configs/${hostname}/${username}.nix";
-  defaultModule = { lib, config, ... }: {
-    _module.args.inputs = self.inputs;
-    _module.args.self = self;
+        manual = {
+          html.enable = false;
+          manpages.enable = false;
+          json.enable = false;
+        };
 
-    manual = {
-      html.enable = false;
-      manpages.enable = false;
-      json.enable = false;
+        home = {
+          inherit username;
+          homeDirectory = "/home/${username}";
+          stateVersion = version;
+        };
+      };
+    in
+    home-manager.lib.homeManagerConfiguration {
+      pkgs = pkgs;
+      modules = [
+        defaultModule
+        entrypoint
+      ] ++ pkgs.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;
 }