about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-25T12·55+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-25T12·55+0100
commit64afb11d60918bb44ba54f243f49b64ef21f8c77 (patch)
tree64d378fc81feb4506bbe418592a484cc50ecdfd9 /emacs/.emacs.d/wpc
parent7a1e56e7d1a7086765f5810993012c52512060dc (diff)
Remove unnecessary code from wpc-nix.el
TL;DR:
- Prefer `(getenv "BRIEFCASE")` to `(f-expand "~/briefcase")`. I should audit my
  Emacs for references to ~/briefcase and replace those calls with `getenv`.
- Remove calls setting <nixpkgs> and <depot> and rely exclusively on <briefcase>
- Prefer ~/nixpkgs-channels to ~/nixpkgs.

Notes:
- I need a better way of calling `home-manager switch` that resides within my
  briefcase
Diffstat (limited to 'emacs/.emacs.d/wpc')
-rw-r--r--emacs/.emacs.d/wpc/wpc-nix.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/emacs/.emacs.d/wpc/wpc-nix.el b/emacs/.emacs.d/wpc/wpc-nix.el
index 501531f23789..52076ab11e26 100644
--- a/emacs/.emacs.d/wpc/wpc-nix.el
+++ b/emacs/.emacs.d/wpc/wpc-nix.el
@@ -13,7 +13,6 @@
 ;; TODO: These may fail at startup. How can I make sure that the .envrc is
 ;; consulted when Emacs starts?
 (prelude/assert (f-exists? (getenv "BRIEFCASE")))
-(prelude/assert (f-exists? (getenv "DEPOT")))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Library
@@ -31,9 +30,7 @@
          (bname (format "*%s*" pname)))
     (start-process pname bname
                    "nix-env"
-                   "-I" (format "nixpkgs=%s" (f-expand "~/nixpkgs"))
-                   "-I" (format "depot=%s" (f-expand "~/depot"))
-                   "-I" (format "briefcase=%s" (f-expand "~/briefcase"))
+                   "-I" (format "briefcase=%s" (getenv "BRIEFCASE"))
                    "-f" "<briefcase>" "-iA" emacs)
     (display-buffer bname)))
 
@@ -42,7 +39,7 @@
   (interactive)
   (start-process "nix/home-manager-switch" "*nix/home-manager-switch*"
                  "home-manager"
-                 "-I" (format "nixpkgs=%s" (f-expand "~/nixpkgs"))
+                 "-I" (format "nixpkgs=%s" (f-expand "~/nixpkgs-channels"))
                  "-I" (format "home-manager=%s" (f-expand "~/home-manager"))
                  "switch")
   (display-buffer "*nix/home-manager-switch*"))