Switching to Asahi Linux and Guix for a quieter experience

This post is about the idea of turning my Macbook M1 into a minimalist “deep work” machine, using Asahi Linux, Guix and Emacs.

First, there was NixOS

I am a huge fan NixOS.

After overcoming the initial (steep) learning curve, it didn’t take me long to be “nix-pilled” and migrate everything to nix. I have multiple machines at home, and they all run their own flavors of NixOS.

My ‘homelab’, which hosts all my services is running NixOS. My experimental DIY router is also running NixOS. My work Macbook is running on nix-darwin, as well as my personal Macbook. All my coding projects contain a flake. My disks partition are defined in nix configurations files with disko and deployed with deploy-rs. Even my neovim config was nixified along the way with the excellent nixcats.

Nix everywhere.

Once you discover declarative systems and packages management, it turns other distros into legacy distros. Using a “normal” OS feels like being in constant sudo mode.

And yet, this weekend, I removed nix-darwin from my personal laptop.

Migrating to Emacs and discovering Guix

About a year ago, I started moving away from Neovim in favour of Emacs. If you spend enough time in the Emacs community, you will inevitably bump into Guix. I discovered Guix about a year ago watching Systems Crafter’s stream.

Guix is inspired by NixOS, and follows the same declarative philosophy. Instead of using nix, a NixOS specific language, Guix use Scheme, a programming language from the lisp family.

I don’t detest the nix language but I never enjoyed it; it always felt like a necessary evil. On the other hand, lisp languages are growing on me.

After investing a fair bit time into NixOS, I was reluctant to move to another OS. Even though I didn’t dig nix, the advantages outweigh my dislike for the language.

I mentally bookmarked Guix, putting into it the “someday/maybe” basket.

The desire for a quiet place

The pace of the tech industry has been frenetic the past two years, with a lot of noise. It has reached a point where I am craving a slower, intentional and focused experience with technology.

For the past few months, I have had this drive to be more intentional with technology. I wanted to turn my personal laptop into a minimalistic, uncluttered and focused device designed to write and code without distractions.

A “deep” work machine with, apart from utilities, only Emacs on it.

Naturally, Guix came as the natural package manager for this idea, thanks to its deep integration with Emacs.

This week end, I put the plan in action. I made a coffee, backed-up my data and wiped my laptop.

I realised that MacOS, out of the box, feels incredibly bloated for my goal.

Luckily, we can now run Linux on M-series Macbook with Asahi Linux.

Stability and NixOS + Asahi Linux

It wasn’t my first attempt to use Asahi.

I ran Asahi on my M1 with NixOS in the past. Even though NixOS is not the officially supported distro on Asahi, it mostly worked. However, it remains experimental and I kept running into not-so-fun and time-consuming small issues. I used my machine for work at the time and needed stability. I ended up reverting it to macOs and nix-darwin fairly quickly.

It was not a big deal. Declarative systems and package manager like nix make reverting your work environment painless. It’s like a git for your OS.

This time, I decided to stick with the official distro for maximum stability: Fedora. Because of this decision, I could only use Guix to manage userland - not the entire system. Think home-manager vs NixOS if you are familiar with nix.

It’s an acceptable trade of for my use case. My home server already runs all my services, this device only needs to be a client of some of those services: forgejo, syncthing, adguard.

Beyond a few system wide packages, such as wireguard and syncthing, I don’t have a need for many system packages.

Installation and experience so far

Both Asahi and Guix were uneventful installations. I followed the instructions, and it just worked. I chose fedora minimal, as I want a minimalistic experience. I don’t want an entire desktop environment.

Now, armed with Guix on my new Asahia-Fedora machine I typed: `guix install emacs`.

(Note: I am yet to use the declarative way of managing package, that’s my next task.)

And… here we are!

I am happy to announce that this blog post is written on Asahi Linux, running Emacs on Fedora minimal, installed via Guix.

I named this device “deep earth”.