New member: Guix + emacs + EXWM development environments

Hi all, I’m a new guild supporter and forum member, and I’m looking forward to being a part of this community :waving_hand:

I’ve been in the Nix ecosystem for the past year, and now I want to check out Guix System as a development (and possibly a production) environment.

I’m particularly interested in “living” in emacs (Guix + emacs + EXWM), as well as leveraging gptel to build and test software with generative AI, and to run other experiments on my system.

Some questions to help smooth the adjustment from NixOS to Guix System:

Is there guidance for mimicking impermanence using disko? This is based on Graham Christensen’s “Erase Your Darlings” (which is a bit out of date). Or is there guidance for declarative disk partitioning?

What’s the state of the art in terms of hardening Guix System? Or where is the best place to find this information?

Are there conventions for configuring multi-host setups? I plan to get started running a Guix VMware guest on a macOS host, as well as on the bare metal of an old Dell laptop. However, I’m also interested running Guix System in my could infra (e.g. production app, db, monitoring/analytics, etc.).

Lastly, I want to start my Guix journey by using literate configuration with org-mode, and I would be grateful for any related references.

Thank you!

Additionally, what are people using instead of SOPS for secrets management?

In NixOS, I’m using a separate nix-secrets repository with SOPS. But I haven’t seen this pattern yet for any Guix System implementations.

I think GPG files work well for managing secrets.

2 Likes

@wxie , thanks for the suggestion, I’ll check that out.

Completely separately, for anyone considering getting started with Guix System, I do not recommend starting in a VM on macOS if you have another path available to you. I’m very blessed to have download speeds up to 700 Mbps+ where I live/work, I dedicated 7 cores, ~15GB of RAM, and 100GB of memory to the VM, and it has still been terribly slow and glitchy. This was after completely failing to build ARM64 and x86_64 systems using VMware Fusion Professional Version 13.6.3 (24585314).

If you absolutely must take this path (UTM on macOS), you might want to start on a Friday evening as soon as you get off of work, and then plan to reserve the rest of the weekend to get the system into a usable state. Or set up a build server on a VPS to do the heavy lifting ahead of time. And prepare to exercise patience like you’re training for a marathon.

I’m currently working on migrating my configuration to a roughly 10-year-old Dell Precision 5520 that I shelved because of an expanding battery issue, but that I’m glad I held on to. I think this will be a much more enjoyable experience. As a silver lining, I guess this means I’m going to get to answer my own question about multi-host setups :melting_face:

Despite these early friction points, I’m still really excited to start living in emacs and exploring Guix System as an alternative to my NixOS dev env. And I’ve become more motivated to build some infra solutions (like build servers) to speed up local development, which I think will be fun.

If any of you have advice for setting up cloud infra on Guix System – especially on Hetzner Cloud – I’d be super grateful. Or even running Guix on NixOS in production, which might be where I land when all is said and done.

Thanks!

Maybe https://guix-hosting.com/ could hinteresst you?

As for other hosters I would build in a VM and then generate an install ISO for this system.scm to upload and run on the VPS. But I’ve never done it and others who did could chime in with there experience hardened knowledge.

1 Like

Thanks for the recommendation. I’ve seen this and think it could be interesting for personal projects. For production deployments I’d feel more comfortable with a large provider like Hetzner.

As for other hosters I would build in a VM and then generate an install ISO for this system.scm to upload and run on the VPS.

This is a good idea and probably what I’m going to attempt as soon as I’ve finished building Guix System on an old Linux laptop. Assuming I have success, I’ll come back here and let people know what worked/didn’t in case there’s interest from other folks to do the same thing.

Good grief (:sweat_smile: ), I finally have Guix System working on bare metal. The System Crafters image from 12/24 appeared to use the libre kernel so I ended up just using the official ISO.

I wish I would’ve written down everything I tried so I could help others avoid the same pain, but here are some high-level points:

  • Do yourself a favor and get a USB → Ethernet adapter if you don’t have an Ethernet port on your machine. This gives you more flexibility if you need to install Guix with the libre kernel first, and it may improve download speeds.
  • Use Codeberg instead of Savannah and save yourself hours of time.
  • It’s much easier to install Guix System on a new partition from within a working Linux OS (NixOS for me). Don’t be like me and wipe everything from Ubuntu Live and then try the install from the Live image.
  • I probably would’ve saved a ton of troubleshooting time by just RTFM for grub. Lesson learned.
  • This is a pretty basic tip, but I think it’s always nice to run the setup from another machine via SSH in case you need to copy/paste a bunch of commands, or wget/curl/nc scripts to the new machine to avoid having to manually type stuff… I used Claude Code to generate these scripts (for installing, profiling, bug hunting/troubleshooting, etc.) and spin up a python HTTP server on my network to download them on the Guix machine, and I think this saved a ton of time.

Next steps:

  • Version control all my system configs so (God forbid) if I ever have to start from scratch again I can avoid a lot of this pain.
  • Compare Sway to EXWM (and Wayland to X11). I was gung-ho about using EXWM at first, but I saw some of David’s comments (about using emacs being enough) in a recent video/stream and think maybe EXWM could be overkill for what I want to do.
  • Set up my Rails development environment (I really like devenv + direnv in NixOS and want to recreate as much of this as I can; tips appreciated!).
  • System optimization and sysadmin stuff.

Hopefully more updates in the coming days :crossed_fingers:

2 Likes