about summary refs log tree commit diff
path: root/users/multi/home
diff options
context:
space:
mode:
authormulti <depot@in-addr.xyz>2020-11-22T19·51+0000
committermulti <depot@in-addr.xyz>2020-11-22T20·29+0000
commit7ff2142f1946be1c9b0182c34602e7697b4272f7 (patch)
treea28a1a9d58ba910a40896d1c0e7bdbdc36a2e169 /users/multi/home
parent69244064da9b60258607fccae4e9c75f0249880f (diff)
refactor(users/multi): migrate whitby home-manager config to readTree-compatible version. r/1899
Add a new home-manager-compatible configuration file which loads the
common config attrset used by the readTree machinery into a structure
which the home-manager command line tool understands.

Garbage-collect the old home-manager configuration file used on whitby,
and update the HOME_MANAGER_CONFIG path to point at the new shim config.

Instead of having a per-environment HM configuration (not that I have
more than one environment), there's now a single configuration which
evaluates to an attrset of configurations, which can be loaded and built
using "home-manager build -A $attr".

Change-Id: Id8b35dc89aabffedf1a4dadfa0d3d4b914e4e2e7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2129
Tested-by: BuildkiteCI
Reviewed-by: multi <depot@in-addr.xyz>
Diffstat (limited to 'users/multi/home')
-rw-r--r--users/multi/home/configs/whitby.nix2
-rw-r--r--users/multi/home/home-manager.nix10
2 files changed, 11 insertions, 1 deletions
diff --git a/users/multi/home/configs/whitby.nix b/users/multi/home/configs/whitby.nix
index 665c11bb878e..bd647cf604b5 100644
--- a/users/multi/home/configs/whitby.nix
+++ b/users/multi/home/configs/whitby.nix
@@ -44,7 +44,7 @@ in
     NIX_PATH =
       "nixpkgs=${pkgs.nixpkgsSrc}:" +
       "depot=${depot.depotPath}";
-    HOME_MANAGER_CONFIG = "${depot.depotPath}/users/multi/whitby/home-manager.nix";
+    HOME_MANAGER_CONFIG = "${depot.depotPath}/users/multi/home/home-manager.nix";
     EDITOR = "vim";
   };
 
diff --git a/users/multi/home/home-manager.nix b/users/multi/home/home-manager.nix
new file mode 100644
index 000000000000..a93a541a0840
--- /dev/null
+++ b/users/multi/home/home-manager.nix
@@ -0,0 +1,10 @@
+let
+  depot = import <depot> {};
+  pkgs = depot.third_party;
+
+  home = path: import path { inherit depot pkgs; };
+in
+  {
+    whitby = home ./configs/whitby.nix;
+  }
+