From 7ff2142f1946be1c9b0182c34602e7697b4272f7 Mon Sep 17 00:00:00 2001 From: multi Date: Sun, 22 Nov 2020 19:51:48 +0000 Subject: refactor(users/multi): migrate whitby home-manager config to readTree-compatible version. 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 --- users/multi/whitby/home-manager.nix | 68 ------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 users/multi/whitby/home-manager.nix (limited to 'users/multi/whitby/home-manager.nix') diff --git a/users/multi/whitby/home-manager.nix b/users/multi/whitby/home-manager.nix deleted file mode 100644 index c034d83f51..0000000000 --- a/users/multi/whitby/home-manager.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ config ? throw "not a readTree target", ... }: - -let - depot = import {}; - pkgs = import {}; - -in - -{ - programs = { - home-manager = { - enable = true; - path = toString pkgs.home-manager.src; - }; - - bash = { - enable = true; - initExtra = '' - bind '"\e[5~":history-search-backward' - bind '"\e[6~":history-search-forward' - - PS1="[\\u@\\h:\\w]\\\$ " - - _Z_CMD=d - source ~/.z.sh - ''; - }; - - tmux = { - enable = true; - terminal = "tmux-256color"; - escapeTime = 50; - extraConfig = '' - bind-key -n C-S-Left swap-window -t -1 - bind-key -n C-S-Right swap-window -t +1 - ''; - }; - - vim = { - enable = true; - extraConfig = "set mouse="; - }; - }; - - home.sessionVariables = { - NIX_PATH = - "nixpkgs=${depot.third_party.nixpkgsSrc}:" + - "depot=${depot.depotPath}"; - HOME_MANAGER_CONFIG = "${depot.depotPath}/users/multi/whitby/home-manager.nix"; - EDITOR = "vim"; - }; - - home.packages = [ - pkgs.lsof - pkgs.strace - pkgs.file - pkgs.pciutils - ] ++ (import ../pkgs { inherit pkgs; }); - - home.file = { - z = { - source = builtins.fetchurl "https://raw.githubusercontent.com/rupa/z/9f76454b32c0007f20b0eae46d55d7a1488c9df9/z.sh"; - target = ".z.sh"; - }; - }; - - home.stateVersion = "20.03"; -} -- cgit 1.4.1