Emacs - Nix

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Ben Kolera

Wow, it's much easier than I had imagined to create a cut down but doom / spacemacs like emacs setup from raw nix emacsPackages, homemanager and not too much use-package based elisp. What I have doesn't replace everything that I had in spacemacs yet, but it shouldn't be too hard to add in as I go. Lovely stuff!

Sridhar Ratnakumar

Can I see your Nix config?

Ben Kolera

https://github.com/benkolera/nix/blob/master/home-manager/default.nix#L126
https://github.com/benkolera/nix/blob/master/home-manager/dotfiles/emacs.d/init.el

Would be good to automate the nix emacs dependency and generation of the use-package stuff with some nix that had the nix dep and the elisp config in it, but it's good enough for now.

Contribute to benkolera/nix development by creating an account on GitHub.
Contribute to benkolera/nix development by creating an account on GitHub.
Ben Kolera

And to be fair, there is a lot that this thing isn't doing that spacemacs and doom do, but this is like my 80% usecase version.

Sridhar Ratnakumar

I'm revisiting this topic right after deciding to switch back to Emacs ... the 'vanilla' one, not the Doom sloth :-) @Ben Kolera I'm gonna steal your config. I don't need home-manager.

Sridhar Ratnakumar

First question I have, though, is: how often are the emacs packages updated in home-manager compared to that of nixpkgs? What's the benefit/drawback of using one over the other?

Ben Kolera

The package set I use is a CI generated expression from the latest melpa. https://github.com/nix-community/emacs-overlay

Bleeding edge emacs overlay [maintainer=@adisbladis] - nix-community/emacs-overlay
Ben Kolera

At least I think so. Not really emacsing or nixing or haskelling much lately. All java and Ubuntu and intellij lol.

tristanC

By the way, I'm also using a vanilla emacs with this config.

Contribute to podenv/devenv development by creating an account on GitHub.
Sridhar Ratnakumar

In lobste.rs someone mentioned using home-manager modules to configure emacs in a modular (and declarative) fashion: https://lobste.rs/s/9dnrvx/vanilla_emacs_on_nixos