Should I make my emacs setup a guix package?

So my final goal is to press a button on my laptop and have it install my entire setup (emacs, users, dotfiles, configs, system packages, etc…) on it.

A big part of that is emacs, and it got me thinking that while their are emacs packages already, e.g “the perfect (guix) setup” What might be a good idea is to aim on putting my specific emacs setup (e.g spacemacs, specific version, build flags, required system packages, etc…) in a guix package.

Does this sound like a good idea?

Has anyone done this before?

If not, what sounds like a better idea?

Thanks again!

I’m in the process of moving my emacs config into guix home. What do you see as an advantage of using guix package instead of guix home?

It’s just a reorganization, right?

If i put all my Emacs-related stuff in a package, I can move that around between different homes as an isolated unit.

atm, I’m choosing aiming at a package because it’s the smallest unit I can think of, I guess I should aim for shell, actually. …

I’ve been using that for about 3 years and it works great. I have it as a package that Guix home deploys along with everything else.

Here is how I have it setup in my channel: plt/home/emacs.scm.

Only slight downside is that you cannot make edits to your config and expect them to stick around. But instead you need to make your changes in your .emacs repo, bump up the package version. So I wrote a tiny emacs function to bump up the version for me: plt-guix-update-emacs-plt-dotemacs.

Testing new changes to you config isn’t that hard now when emacs have the --init-directory option. You just need to have a clone of your .emacs files somewhere else that you do you changes to, point --init-directory to that when testing. Or if it’s something simple just evaluate it in your current Emacs session and see if it works. Org-roam can get a bit confused though, and I’m not entirely sure why.

And I think it should be possible to compile and save the state of everything loaded to get Emacs open as fast as emacs -q. But my start-up time is good enough as I just open Emacs max ones per day, so I haven’t investigate if it’s actually doable.