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
This commit is contained in:
		
							parent
							
								
									7a1e56e7d1
								
							
						
					
					
						commit
						64afb11d60
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		|  | @ -13,7 +13,6 @@ | ||||||
| ;; TODO: These may fail at startup. How can I make sure that the .envrc is | ;; TODO: These may fail at startup. How can I make sure that the .envrc is | ||||||
| ;; consulted when Emacs starts? | ;; consulted when Emacs starts? | ||||||
| (prelude/assert (f-exists? (getenv "BRIEFCASE"))) | (prelude/assert (f-exists? (getenv "BRIEFCASE"))) | ||||||
| (prelude/assert (f-exists? (getenv "DEPOT"))) |  | ||||||
| 
 | 
 | ||||||
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||||||
| ;; Library | ;; Library | ||||||
|  | @ -31,9 +30,7 @@ | ||||||
|          (bname (format "*%s*" pname))) |          (bname (format "*%s*" pname))) | ||||||
|     (start-process pname bname |     (start-process pname bname | ||||||
|                    "nix-env" |                    "nix-env" | ||||||
|                    "-I" (format "nixpkgs=%s" (f-expand "~/nixpkgs")) |                    "-I" (format "briefcase=%s" (getenv "BRIEFCASE")) | ||||||
|                    "-I" (format "depot=%s" (f-expand "~/depot")) |  | ||||||
|                    "-I" (format "briefcase=%s" (f-expand "~/briefcase")) |  | ||||||
|                    "-f" "<briefcase>" "-iA" emacs) |                    "-f" "<briefcase>" "-iA" emacs) | ||||||
|     (display-buffer bname))) |     (display-buffer bname))) | ||||||
| 
 | 
 | ||||||
|  | @ -42,7 +39,7 @@ | ||||||
|   (interactive) |   (interactive) | ||||||
|   (start-process "nix/home-manager-switch" "*nix/home-manager-switch*" |   (start-process "nix/home-manager-switch" "*nix/home-manager-switch*" | ||||||
|                  "home-manager" |                  "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")) |                  "-I" (format "home-manager=%s" (f-expand "~/home-manager")) | ||||||
|                  "switch") |                  "switch") | ||||||
|   (display-buffer "*nix/home-manager-switch*")) |   (display-buffer "*nix/home-manager-switch*")) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue