From 9d6d945f524c06836c1292b3f9ab862521e32b1a Mon Sep 17 00:00:00 2001 From: multi Date: Sun, 22 Nov 2020 15:16:21 +0000 Subject: [PATCH] refactor(users/multi/whitby): use the depot's own source location attribute. The depot knows where it is, not because it knows where it isn't, but because it does an "import ./." at the top level and then makes this path value available in the attrset passed to the rest of the tree. My home-manager config on whitby previously involved manual specification of the depot checkout location on whitby, however this isn't necessary when the depot can already magically tell us where it is. Change-Id: I68577c8ef2cda6ba5bc46cf8f4821aac021c8066 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2122 Tested-by: BuildkiteCI Reviewed-by: multi --- users/multi/whitby/depot.nix | 6 ------ users/multi/whitby/home-manager.nix | 5 ++--- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 users/multi/whitby/depot.nix diff --git a/users/multi/whitby/depot.nix b/users/multi/whitby/depot.nix deleted file mode 100644 index c0bda4d98..000000000 --- a/users/multi/whitby/depot.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ config ? throw "not a readTree target", ... }: - -let - depotPath = "/home/multi/depot"; -in - depotPath diff --git a/users/multi/whitby/home-manager.nix b/users/multi/whitby/home-manager.nix index 18deeb4b5..c034d83f5 100644 --- a/users/multi/whitby/home-manager.nix +++ b/users/multi/whitby/home-manager.nix @@ -4,7 +4,6 @@ let depot = import {}; pkgs = import {}; - depotPath = depot.users.multi.whitby.depot; in { @@ -46,8 +45,8 @@ in home.sessionVariables = { NIX_PATH = "nixpkgs=${depot.third_party.nixpkgsSrc}:" + - "depot=${depotPath}"; - HOME_MANAGER_CONFIG = "${depotPath}/users/multi/whitby/home-manager.nix"; + "depot=${depot.depotPath}"; + HOME_MANAGER_CONFIG = "${depot.depotPath}/users/multi/whitby/home-manager.nix"; EDITOR = "vim"; };