Guix shell now inside Emacs
22 points by tusharhero
22 points by tusharhero
For nix, I use direnv, and the envrc package for emacs to pull the direnv-mediated environment into the editor environment. That way, it’s not nix-specific, and any other modifications to the local env made with direnv come along with the nix stuff.
Yes, I also mention of an asynchronous fork of envrc too. The problem with this approach is that you can't do adhoc environments. And I find it tedious to write the files as well.
I currently use buffer-env to handle setting up environment variables from guix.scm/manifest.scm. It integrates with project.el and applies for all buffers in the project, not just a shell buffer. The only complaint I have with this setup is that it's not async: building or updating an environment blocks Emacs. I'd like to switch to this new Guix-specific integration but afaict it only makes shell buffers?
M-x guix-shell is completely async, and it applies to all buffers in the project (as it also integrates with project.el), not just shell buffers. So I think you can switch to it easily.
Though, I have currently hard coded manifest.scm, so some more work is needed to make support more advanced use cases.