about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-07-06T14·32-0400
committerglittershark <grfn@gws.fyi>2020-07-13T23·41+0000
commitcc12188d31be955ed9c7f79a1d23c36e73f16c99 (patch)
tree1abc97576e8731c9031c6cbd388f07db4aae29ed
parentae16a8e9cf8f75a04442b0ddc40d83fb218dd33b (diff)
feat(gs/home): Integrate home-manager with depot r/1282
Essentially the same as for nixos, so I can get whitby to compile stuff
for me. Eventually I'll generalize this so things aren't as hardcoded to
my particular setup, but for now I'm the only one in the depot who's
using home-manager so this should be fine.

Change-Id: I1cb0344f5a11eea68bddc98976999c0928dfa84e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/937
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
-rw-r--r--ci-builds.nix4
-rw-r--r--users/glittershark/system/home/default.nix26
-rw-r--r--users/glittershark/system/home/machines/chupacabra.nix12
-rw-r--r--users/glittershark/system/home/modules/alsi.nix2
-rw-r--r--users/glittershark/system/home/modules/common.nix2
-rw-r--r--users/glittershark/system/home/modules/development.nix6
-rw-r--r--users/glittershark/system/home/modules/development/agda.nix7
-rw-r--r--users/glittershark/system/home/modules/development/kube.nix5
-rw-r--r--users/glittershark/system/home/modules/emacs.nix3
-rw-r--r--users/glittershark/system/home/modules/i3.nix1
-rw-r--r--users/glittershark/system/home/modules/lib/depot.nix5
-rw-r--r--users/glittershark/system/home/modules/urbint.nix9
-rw-r--r--users/glittershark/system/home/platforms/linux.nix13
-rw-r--r--users/glittershark/system/system/modules/xserver.nix14
14 files changed, 67 insertions, 42 deletions
diff --git a/ci-builds.nix b/ci-builds.nix
index 8be0953a87..b0bb6fa615 100644
--- a/ci-builds.nix
+++ b/ci-builds.nix
@@ -99,9 +99,11 @@ in lib.fix (self: {
   ];
 
   glittershark = with depot.users.glittershark; [
-    (systemFor system.system.chupacabra)
     xanthous
     keyboard.layout
     owothia
+
+    (systemFor system.system.chupacabra)
+    system.home.chupacabra.activationPackage
   ];
 })
diff --git a/users/glittershark/system/home/default.nix b/users/glittershark/system/home/default.nix
new file mode 100644
index 0000000000..762b8a6656
--- /dev/null
+++ b/users/glittershark/system/home/default.nix
@@ -0,0 +1,26 @@
+{ pkgs, depot, lib, ... }:
+
+with lib;
+
+rec {
+  nixpkgs = import pkgs.nixpkgsSrc {};
+
+  home-manager = (fetchTarball {
+    url = "https://github.com/rycee/home-manager/archive/5f189acce44dc39ea4055bfd8064adaf90d7fb5a.tar.gz";
+    sha256 = "0ibmvg3k9m9yzh8ln3jlh47nrvgg81iy8gpl112wjimlp6gagxw6";
+  });
+
+  home = confPath: import "${home-manager}/modules" {
+    pkgs = nixpkgs;
+    configuration = { config, lib, ... }: {
+      imports = [confPath];
+
+      _module.args.pkgs = mkForce
+        (import pkgs.nixpkgsSrc (filterAttrs (n: v: v != null) config.nixpkgs));
+
+      lib.depot = depot;
+    };
+  };
+
+  chupacabra = home ./machines/chupacabra.nix;
+}
diff --git a/users/glittershark/system/home/machines/chupacabra.nix b/users/glittershark/system/home/machines/chupacabra.nix
index 06b0d21567..399b0e9f95 100644
--- a/users/glittershark/system/home/machines/chupacabra.nix
+++ b/users/glittershark/system/home/machines/chupacabra.nix
@@ -1,4 +1,7 @@
-{ pkgs, ... }:
+{ pkgs, lib, config, ... }:
+
+with lib;
+
 let
   laptopKeyboardId = "25";
 in {
@@ -7,12 +10,13 @@ in {
     ../modules/common.nix
     ../modules/games.nix
     ../modules/rtlsdr.nix
-
-    ~/code/urb/urbos/home
+    ../modules/urbint.nix
   ];
 
   # for when hacking
   programs.home-manager.path = "/home/grfn/code/home-manager";
+  programs.home-manager.enable = true;
+  home.stateVersion = "19.09";
 
   system.machine = {
     wirelessInterface = "wlp59s0";
@@ -40,6 +44,4 @@ in {
       );
     };
   };
-
-  urbint.projectPath = "code/urb";
 }
diff --git a/users/glittershark/system/home/modules/alsi.nix b/users/glittershark/system/home/modules/alsi.nix
index e42524bb88..19ec68efd2 100644
--- a/users/glittershark/system/home/modules/alsi.nix
+++ b/users/glittershark/system/home/modules/alsi.nix
@@ -1,5 +1,5 @@
 { config, lib, pkgs, ... }:
-let alsi = pkgs.callPackage ~/code/system/pkgs/alsi {};
+let alsi = pkgs.callPackage ../../pkgs/alsi {};
 in
 {
   home.packages = [ alsi ];
diff --git a/users/glittershark/system/home/modules/common.nix b/users/glittershark/system/home/modules/common.nix
index ed7a729a79..891e1c290e 100644
--- a/users/glittershark/system/home/modules/common.nix
+++ b/users/glittershark/system/home/modules/common.nix
@@ -22,8 +22,6 @@
     path = ".local/share/password-store";
   };
 
-  urbint.projectPath = "code/urb";
-
   home.packages = with pkgs; [
     # System utilities
     bat
diff --git a/users/glittershark/system/home/modules/development.nix b/users/glittershark/system/home/modules/development.nix
index d786154f6d..d60fb7be5d 100644
--- a/users/glittershark/system/home/modules/development.nix
+++ b/users/glittershark/system/home/modules/development.nix
@@ -46,14 +46,14 @@ with lib;
     gnumake
     inetutils
     loc
-    (import <nixpkgs-unstable> {}).jsonnet
+    jsonnet
 
     clj2nix
 
     pg-dump-upsert
 
-    (import ../pkgs/clang-tools { inherit pkgs; })
-  ] ++ optional (stdenv.isLinux) julia;
+    config.lib.depot.third_party.clang-tools
+  ]; # ++ optional (stdenv.isLinux) julia;
 
   programs.git = {
     enable = true;
diff --git a/users/glittershark/system/home/modules/development/agda.nix b/users/glittershark/system/home/modules/development/agda.nix
index 7a197e907f..bed05693aa 100644
--- a/users/glittershark/system/home/modules/development/agda.nix
+++ b/users/glittershark/system/home/modules/development/agda.nix
@@ -1,10 +1,7 @@
 { config, lib, pkgs, ... }:
 
 let
-
-  nixpkgs-unstable = import <nixpkgs-unstable> {};
-
-  agda-categories = with nixpkgs-unstable.agdaPackages; mkDerivation rec {
+  agda-categories = with pkgs.agdaPackages; mkDerivation rec {
     pname = "agda-categories";
     version = "2128fab";
     src = pkgs.fetchFromGitHub {
@@ -25,7 +22,7 @@ in
   ];
 
   home.packages = with pkgs; [
-    (nixpkgs-unstable.agda.withPackages
+    (pkgs.agda.withPackages
       (p: with p; [
         p.standard-library
 
diff --git a/users/glittershark/system/home/modules/development/kube.nix b/users/glittershark/system/home/modules/development/kube.nix
index 346dd57dee..97ae4760d4 100644
--- a/users/glittershark/system/home/modules/development/kube.nix
+++ b/users/glittershark/system/home/modules/development/kube.nix
@@ -1,13 +1,10 @@
 { config, lib, pkgs, ... }:
-let
-  pkgs-unstable = import <nixpkgs-unstable> {};
-in
 {
   home.packages = with pkgs; [
     kubectl
     kubetail
     sops
-    pkgs-unstable.kubie
+    kubie
     # pkgs-unstable.argocd # provided by urbos
   ];
 
diff --git a/users/glittershark/system/home/modules/emacs.nix b/users/glittershark/system/home/modules/emacs.nix
index f4322b6115..935e7b7c3f 100644
--- a/users/glittershark/system/home/modules/emacs.nix
+++ b/users/glittershark/system/home/modules/emacs.nix
@@ -10,12 +10,11 @@ let
  #                               # and packages.el files
  # };
 
-
   depot = config.lib.depot;
+
 in {
   imports = [
     ./lib/cloneRepo.nix
-    ./lib/depot.nix
   ];
 
   # home.packages = [ doom-emacs ];
diff --git a/users/glittershark/system/home/modules/i3.nix b/users/glittershark/system/home/modules/i3.nix
index 07f9fc08ca..821c1e5d25 100644
--- a/users/glittershark/system/home/modules/i3.nix
+++ b/users/glittershark/system/home/modules/i3.nix
@@ -40,6 +40,7 @@ in {
         rofi-pass
         python38Packages.py3status
         i3lock
+        i3status
         dconf # for gtk
 
         # Screenshots
diff --git a/users/glittershark/system/home/modules/lib/depot.nix b/users/glittershark/system/home/modules/lib/depot.nix
deleted file mode 100644
index b0bc40acce..0000000000
--- a/users/glittershark/system/home/modules/lib/depot.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  lib.depot = import ~/code/depot {};
-}
diff --git a/users/glittershark/system/home/modules/urbint.nix b/users/glittershark/system/home/modules/urbint.nix
new file mode 100644
index 0000000000..013735f0de
--- /dev/null
+++ b/users/glittershark/system/home/modules/urbint.nix
@@ -0,0 +1,9 @@
+{ config, lib, pkgs, ... }:
+
+if lib.pathExists (~/code/urb/urbos)
+then {
+  imports =
+    [ ~/code/urb/urbos/home ];
+
+  urbint.projectPath = "code/urb";
+} else {}
diff --git a/users/glittershark/system/home/platforms/linux.nix b/users/glittershark/system/home/platforms/linux.nix
index 721705218f..fd9bcf1924 100644
--- a/users/glittershark/system/home/platforms/linux.nix
+++ b/users/glittershark/system/home/platforms/linux.nix
@@ -20,7 +20,6 @@ in
     ../modules/shell.nix
     ../modules/tarsnap.nix
     ../modules/vim.nix
-    ../modules/lib/depot.nix
   ];
 
   xsession.enable = true;
@@ -84,12 +83,12 @@ in
     ];
   };
 
-  programs.tarsnap = {
-    enable = true;
-    keyfile = "/home/grfn/.private/tarsnap.key";
-    printStats = true;
-    humanizeNumbers = true;
-  };
+  # programs.tarsnap = {
+  #   enable = true;
+  #   keyfile = "/home/grfn/.private/tarsnap.key";
+  #   printStats = true;
+  #   humanizeNumbers = true;
+  # };
 
   programs.zsh.initExtra = ''
     [[ ! $IN_NIX_SHELL ]] && alsi -l
diff --git a/users/glittershark/system/system/modules/xserver.nix b/users/glittershark/system/system/modules/xserver.nix
index 2638f07524..813884fa6d 100644
--- a/users/glittershark/system/system/modules/xserver.nix
+++ b/users/glittershark/system/system/modules/xserver.nix
@@ -7,12 +7,12 @@
 
     libinput.enable = true;
 
-    windowManager.i3 = {
-      enable = true;
-      extraPackages = with pkgs; [
-        i3status
-        i3lock
-      ];
-    };
+#     windowManager.i3 = {
+#       enable = true;
+#       extraPackages = with pkgs; [
+#         i3status
+#         i3lock
+#       ];
+#     };
   };
 }