Guix System + Sway - Train

Decided to share my recent experience/learnings in Guix migrating from StumpWM to Sway and setting up my Guix config as a Guile program.

After three pivitol SystemCrafters episodes, I finally decided to make the switch from StumpWM to Sway and completely overhaul my Guix configuration:

  1. How to Organize Your Guix Configuration - System Crafters
  2. Crafting a Minimal Sway Environment in Guix - System Crafters
  3. Configuring Rational Emacs with Guix Home - System Crafters

I have to say that Sway is much simpler to configure, at least on a basic standpoint - though I did spend quite some time configuring my swaybar (image below). Things are simply way more polished than I could have ever achieved in StumpWM, perhaps given my experience level.

2024-11-09T14:15:05,549945402-08:00

Learning the power of customizing Guix services was a HUGE gain in harnessing the power of Guix! I also decided to create my own Emacs configuration as a package, similar to Crafted Emacs, and add to my Guix configuration via an extended service. This is similar to what the home-emacs-service-type patch that David contributed to may provide (in addition to mainly configuring Emacs in Guile) once it makes it upstream :crossed_fingers: (see: https://issues.guix.gnu.org/64620). This part was done in preparation for this feature.

Constructing my Guix configuration as a Guile program rather than a script or a set of configuration files was an absolute game changer for me! I went on a conquest converting everything to services that I possibly could, mainly extending home-profile-service-type for sway desktop packages and home-xdg-configuration-files-service-type to handle mostly sway-related configuration files as well as qutebrowser (yes decided to give it a try over Nyxt until it matures more). Defining each as their own standalone Guile module really makes for clean code aesthitics (in my opinion)!

I also decided to move all my repo’s to Codeberg! So far I am really enjoying the experience and definitely like the forgejo-dark theme!

Overall, definitely motivated and “pumped” to use Guile more so now seeing that it created such an interesting piece of art that we know as Guix! I even decided to abandon Common Lisp for Guile in an application I’ve been trying to bring to life. Currently playing around with guile-sdl2 for the UI aspect, but should probably get to implenting the more important aspects (but first need to become more proficient in Scheme).

Hope that yall found this somewhat interesting, useful, or motivating.

Best,

Erik

4 Likes

This config helped me a lot get my system over from nix. Glad I made the switch. Excited to explore Guile more.

1 Like

Awesome, glad to hear! I am having a lot of fun learning Guile & Guix and hopefully make some real forward progress on my application soon. Also, excited to explore Guix more and perhaps contribute one of these days (or maybe even to Guile).

1 Like

I’ll keep my eye on what you’re up to for sure. System Crafters and David have been a big influence on the direction I’ve taken in my personal development over the years. Thanks for contributing to the space, Guix/Guile and Emacs are amazing.

1 Like

Thanks! Same here - as you can see the base of my config is borrowed from those three episodes David did as well as a few items from his dotfiles repo, I just expanded/personalized from there.

I tried NixOS out for 6 months, but personally didn’t like it as much as “GuixOS”. Even though Guix is still a bit rough around the edges, i.e. it’s installer is no where near as nice as NixOS’, it has ugly unformatted tty log/errors at startup (to name a few eye sores), it’s functional core is amazing. Just wish they used a modern Git forge, so that contributing had a lesser barrier to entry - contributing issues/patches right now feels akin to sending emails off into the ether to perhaps never be noticed and just sit and bitrot…

I really like Guile Scheme and even took David’s intro course (highly recommended - still using it’s materials now as I dive back in to Guile), but veered towards learning/using Common Lisp for 7 months, which helped me solidify my understanding of why I would rather use Guile - Scheme is really a beautiful language!

1 Like

I’m glad that Nix Darwin is available as it has saved me time during work hours but I would, and do on personal builds choose Guix from now on.

I agree, there has been some challenges moving, but I feel some of the weirdness of Nix prepared me to understand and appreciate Guix more haha.

On Guile, I still need to spend time getting to know it more, but so far enjoying the experience.

Thanks again.

1 Like