devenv
                                
                                 devenv copied to clipboard
                                
                                    devenv copied to clipboard
                            
                            
                            
                        No support for emacs?
It would be great to add support for emacs, allowing us to install emacs with a list of packages etc. Not sure if I just missed something obvious or not.
Emacs support is handled via direnv integration. https://docs.doomemacs.org/v21.12/modules/tools/direnv/
- Emacs loads .envrc via direnv
- Direnv loads devenv.nix script and runs use devenv
- Emacs sees the updated env vars (PATH, etc.)
This is true for all other editors as well, for future reference. This is why no explicit support is needed, direnv is the common interface.
I mean, I want to provide a nix-shell where emacs is installed with some pre-configured packages. As far as I understand, what you describe here is a setting where emacs is already installed and we want to load the configuration from devenv inside (actually, I guess in that case the host-installed emacs will not pick extension from the devenv file?).
Ah, sorry I misunderstood.
That's an interesting and novel idea! Usually people have their editors setup on their "host" and use devenv for the project-specific dependencies. For this reason what you seek is done usually on the NixOS/home-manager level.
Those module systems already handle what you seek. It shouldn't be too tough of an effort to port it from there, especially from home-manager.
As a more general implementation, it would be interesting to support home-manager's module system and transpile it to DEVENV_PROFILE folder.
This way we could get vim/neovim/emacs/etc. for "free".
Yeah that would be really cool. To be honest, I already have a home manager module doing that, and I precisely wanted to find a way to use directly the home manager module in a flake-like setting to both share the home-manager module for people that want to add plugins to an existing home manager install, or directly to spawn a shell with emacs installed for others.
It would be awesome to include hm modules in a non disruptive way for the host. +1
I’ve found this https://discourse.nixos.org/t/home-manager-shell-nix-shell-for-your-home-manager-config/24632
Where proot is used to achieve the “non disruptiveness” and could be used for inspiration or even adoption 😊