Support nix/home-manager-switch
As a part of my plan to reduce my dependence on the shell, I defined an Elisp function to call `home-manager switch` from `M-x`.
This commit is contained in:
parent
2eb9259a1b
commit
96ff26e5ca
1 changed files with 10 additions and 0 deletions
|
@ -29,6 +29,16 @@
|
||||||
"nix-env" "-f" "<briefcase>" "-iA" "emacs")
|
"nix-env" "-f" "<briefcase>" "-iA" "emacs")
|
||||||
(display-buffer "*nix-build/<briefcase/emacs>*"))
|
(display-buffer "*nix-build/<briefcase/emacs>*"))
|
||||||
|
|
||||||
|
(defun nix/home-manager-switch ()
|
||||||
|
"Use Nix to reconfigure the user environment."
|
||||||
|
(interactive)
|
||||||
|
(start-process "nix/home-manager-switch" "*nix/home-manager-switch*"
|
||||||
|
"home-manager"
|
||||||
|
"-I" (format "nixpkgs=%s" (f-expand "~/nixpkgs"))
|
||||||
|
"-I" (format "home-manager=%s" (f-expand "~/home-manager"))
|
||||||
|
"switch")
|
||||||
|
(display-buffer "*nix/home-manager-switch*"))
|
||||||
|
|
||||||
(defun nix/sly-from-briefcase (attribute)
|
(defun nix/sly-from-briefcase (attribute)
|
||||||
"Start a Sly REPL configured with a Lisp matching a derivation
|
"Start a Sly REPL configured with a Lisp matching a derivation
|
||||||
from my monorepo.
|
from my monorepo.
|
||||||
|
|
Loading…
Reference in a new issue