Beyond package management: How Nix refactored my digital life
(You can find my Nix config over on Github)
I'm a disorganised person. My workflow is to bounce around a codebase for days/weeks at a time and when I come up for air I'll usually have left a slew of configs, tools, scripts, repos scattered around my computer like the socks near the bed, or the pile of paperwork on my desk. After a while I reach a point where it all becomes unmanageable. I'll wade on (unproductivley) for as long as I can until I can't go any further and I reset my laptop and waste a week reconfiguring the system, tooling and getting my projects all re-setup. So when I discovered Nix (about 12 months back) it sounded too good to be true: A declarative package manager that creates reproducible builds with pinned package versions, and to boot: there is something called NixOS that applies these principles to your entire operating system! I was incredibly excited by it but then got horrendously bogged down in my first system config. I shelved it as something to come back to when I had more time. Several months later I gave it another try and spent the time needed to understand how to properly configure it. Result? Well let's just say I'm never going back -boy oh boy, Nix is wild! In this post, I'll walk you through my journey: reviving an old Pixelbook with NixOS, wrangling my MacBook with nix-darwin, and super-charging Nix with AI to solve a problem I thought was unsolvable.
NixOS on an old Pixelbook
I gave Nix a second chance as I had a slow old Pixelbook Go (2017 Chromebook that I'd picked-up cheap on ebay). It frustrated me how sluggish it was despite being reasonably well-specced. I jailbroke the bios (using the excellent guides over at MrChromebox) and overwrote it with an open-source BIOS, 'Coreboot', which allowed me to then install NixOS (jailbreaking the pixelbook was more involved than I expected requiring me to disconnect the battery to enable writing to bios!). Getting a simple NixOS system running was simple and I was instantly blown away by the speed! The Pixelbook (now a Nixelbook) had never felt so snappy -it was a joy to use. I've not used Linux on the desktop for almost 15 years (I started on Linux in the early 2000s with Debian Woody and remember the hype around Ubuntu Warty Warthog!) so I had great fun playing around with all the cool new stuff -especially the display managers! Everything worked remarkably well except the parts specific to the Pixelbook: The AI assistant button, the function key row and the speakers. I've almost got everything working now -more on this later!

Running Nix on my macbook
The Nixelbook was a triumph, but could I apply this same magic to my daily driver, a chaotic M1 MacBook Pro? My system is a mess; way too much stuff, brew packages, countless dev projects, tooling and SDKs installed globally. I'm also never quite sure about the correct way to fully purge something on macOS (especially if it's been installed via an installer). Enter Nix: I can now enable those configurations I setup for my NixOS laptop on a per-module basis for my macbook. The macOS flavour of Nix is called nix-darwin which has a few differences/gotchas you'll encounter due to the differences between Linux & macOs/unix. Also I'm running an Apple silicon macbook pro- so the packages I use need to have aarch64-darwin builds (which most do). With a little bit of patience you can configure your various hosts and share your nix modules across systems with different architectures. This for me is huge: I can have a dependable, reproducible configuration, I am in control of every aspect, and every configuration is deliberate, considered and under version control.
Declarative Dev Environments
Many moons ago I used Ansible for dev-ops configuration, it was powerful but also painful. It would be overkill for small projects, and it certainly wouldn't be good for configuring desktop tooling etc. The NixOs package repository with pinned versions for configuration is the HUGE differentiator for me. I'm not at the stage of configuring my cloud containers with NixOS (that will be a challenge for another day), but for local development environments this is huge. For this, I use Nix Flakes. Flakes are the modern way to package Nix expressions, locking all dependencies for true reproducibility. I configure my projects as Nix Flakes that checkout the code, provide utility scripts and configure the environment by installing SDKs (pinned to specific version) and any tooling required. This is all automagically configured the moment I enter a projects directory (using direnv) and then the moment I leave the directory it all disappears: SDKs, running services, tooling - even IDEs if you wish. Doing something like this, supporting different system architectures with Ansible would be a nightmare (and far beyond my ability!). As I can now reproduce my configurations I'm leaning heavily in to nushell as my default shell environment, and I've created a couple of nuscripts (gm.nu and dartboard.nu) to manage my bigger projects, handling everything from batch-updating and running tests across various projects to syncing and managing git submodules in mono-repos. My flakes (example) can enable these global scripts, and I have them configured to give me a project overview each time the flake is loaded. I'm willing to spend longer creating the perfect dev environment as now it's reproducible, my utility tools and scripts can be shared among projects and I'm seeing qualitative improvements to my developer experience because of it.
Nix + AI = 🤯
My biggest challenge was the Nixelbook's audio. After jailbreaking the Chromebook, I discovered the audio drivers were unavailable -a dead end that others online had hit with no success. I'd failed miserably trying to fix it myself. As a last resort, I decided to see if an AI could help me crack it. I tasked Claude Code with the problem and the results were astonishing, I watched as the AI Agent (under close supervision) methodically and meticulously tried various approaches whilst monitoring several system logs and working through errors that I probably would never have even discovered. Eventually it(/we?) managed to locate the final piece of the puzzle: the speakers topology file (that someone had recovered from the ChromeOS recovery image) which with some impressive nix configuration literally brought music to my ears (if you have a Pixelbook Go/Chromebook Atlas, help yourself to the solution here!).
What's next & final thoughts
Earlier this year Google released 'Linux Terminal' which provides a virtualized Linux environment on Android, of course there is already Nix support. I'm going to configure my Pixel phone as a host in my nix config which will give me a fully-fledged, perfectly configured Linux OS in my pocket- everything setup just the way I like it. I could also play with using Nix as a tool for configuring cloud infrastructure -something I would like to explore further down the road.
My closing comment is that Nix has blown me away. It's refactored my chaotic digital life in to something well structured, thoughtfully considered, reproducible and dependable, and I'm reaping the rewards of all of this already. I urge everyone to take a look at Nix and give it the time it deserves; you can thank me later (over in my guestbook!).