The NixOS Journey: Years of Distro-hopping, two rage quits and a lot of swearing

Share
The NixOS Journey: Years of Distro-hopping, two rage quits and a lot of swearing
Shamelessly snatched from r/NixOS

I'm open-sourcing my NixOS configuration. Here's the story behind it.

The Distro-Hopping Years

Like so many of you, I spent the last 10 years searching for my perfect setup. Windows to Linux. Linux to Windows. Back again. Repeat.

Then Steam invested heavily in Proton, and suddenly Linux gaming became real. That was the turning point. I could finally make Linux my daily driver for everything. You can literally run (almost) anything with Proton today!

WSL happened around then too - Windows was actually good enough for a while. But I got so hooked on KDE that I couldn't look back. Still recommend it to anyone getting started with Linux. It's the perfect DE for newcomers and power-users!

First NixOS Attempt: Total Failure

A colleague mentioned Nix when I started going deep into DevOps. Looked cool. Why not try it?

Oh my god did I fail. Badly.

I scratched it and swore I'd never come back.

Why NixOS Though?

For those unfamiliar, here's why NixOS keeps pulling people in despite the steep learning curve:

  • Reproducibility - Same config = same system. Period. No "works on my machine" nonsense.
  • Atomic upgrades - Updates either fully succeed or fully fail. No half-broken states.
  • Instant rollbacks - Broke something? Boot into the previous generation. Done.
  • Declarative everything - Your entire system is defined in code. Version control your OS.
  • No dependency hell - Packages are isolated. Multiple versions can coexist.
  • Try before you commit - nix-shell -p package lets you test anything without installing it.
  • Dev environments - Per-project dependencies that don't pollute your system.
  • One config, many machines - Same flake can manage your desktop, laptop, server, and phone.

The promise is real. The path to get there is just... painful.

The Itch That Wouldn't Go Away

I went back to Debian. Then Arch. Then KDE Neon. But the whole time, I kept thinking about what NixOS preached. Every time I'd configure something manually I'd think "Ha, it would be so cool to make this declarative."

So I tried again. This time I actually planned it out. Read the docs. Watched Vimjoyer's YouTube videos religiously. Mapped out how it would work across all my devices. I was obsessed with the dream of setting up my entire system with one command.

But NixOS consumed me. It took so much time and mental energy that I couldn't focus on actual work. Basic things like installing Python modules for today's task became puzzles. I put it on hold again as my daily driver and relegated it to my spare laptop for weekend tinkering.

Finally Getting Somewhere

After many painstaking months, I had a viable setup. Ran it for a few days. Started getting the hang of it.

Then I started expanding it and everything got messy. No way in hell was I starting from scratch a third time.

Enter Claude

The AI boom happened. As these tools got better, I picked Claude as my personal assistant for rebuilding this entire config into something coherent.

I'll be honest - at first it was pure vibe-coding. Things got even messier.

But then I changed my approach. I started defining rules and standards. Wrote specs first, then implemented. Approached it from a spec-driven development perspective. That's when things actually started working.

I took isolated parts of my config and made them better one piece at a time.

The Honest Truth About AI-Assisted Development

Do I rely on Claude for minor tasks? No.

Do I involve Claude in architectural decisions? Absolutely.

I've had moments where Claude suggested something and I thought "damn, I should have thought of that."

I've also had moments where I thought "wtf Claude, why..."

I know I'll get hate from the hardcore community. "AI slop." "Vibe-coding." I get it.

But here's the thing: I'm genuinely happy with where this is now. Could I have done it without AI? Maybe. Would I have had the time and mental capacity? Hell no. I quit twice before.

Why Not Just Buy a MacBook?

Honestly, I don't know.

But the rush I get from making all this work is unlike anything else I've experienced. The moment when I buy a new SSD or a new computer and just continue in the exact same state - that's pure victory for me. And it works on any hardware I want. I have full control.

Adding new devices to my setup is now a breeze. Every system behaves exactly as I want. Every project is configured exactly how I like it.

Even if I got a MacBook in the future I would just slap nix-darwin on top of it now.

The Terraform Moment

After managing my home setup and a couple of projects with Nix, something clicked.

I started seeing the same potential in NixOS that I see in Terraform and Terragrunt. That initial pain of learning the syntax, understanding the abstractions, fighting with state - it's the same curve. And just like with infrastructure-as-code, after a while everything pays off.

You stop thinking about "how do I install this" and start thinking about "how do I want this to work across all my systems." The mental model shifts from manual configuration to declarative intent.

Once you're past the learning curve, adding a new package is one line. Spinning up a new machine is one command. Rolling back a broken change is trivial. It's the same feeling I get when a well-structured Terraform codebase just works across environments.

Should You Use NixOS?

Maybe? Depends.

It takes way too much time, especially if you don't have focus to spare.

But if you have that same itch I had - wanting something reproducible, manageable across multiple devices, wanting to actually understand how things work under the hood - then maybe.

If that's you, start with Vimjoyer's channel. It's probably the main reason I kept trying. Also check out LibrePhoenix - his videos and configs heavily influenced my early setup.

What's In The Box

Here's a taste of what this config includes:

Desktop Environment

  • Niri + DankMaterialShell - Wayland compositor with a custom shell. Device-specific layouts: 3-column for my ultrawide monitor, 2-column for laptops. Window rules that auto-place apps like Slack and KeePassXC on specific monitors. Infinite scrolling carousel and workspaces - exactly what I wanted but didn't know until I tried it.

Terminal Setup

  • Ghostty + tmux + Zsh - Unified terminal experience across all devices. Sessions persist across reboots. Random startup eye-candy (ASCII art, fortune cows, system info). Modern CLI tools: bat, lsd, fd, ripgrep, zoxide, bottom.

Firefox

  • Multiple profiles with custom addon management. Work profiles with AWS role switcher. Privacy-first defaults. Custom addon packaging for extensions not in nixpkgs.

Secrets Management

  • Agenix for encrypted secrets. WiFi passwords, API keys, whatever - encrypted in the repo, decrypted at boot. No plain text secrets anywhere.

DevOps Tooling

  • Full stack pre-configured: kubectl, k9s, helm, terraform, terragrunt, ansible, AWS/Azure/GCP CLIs. Custom awsp function for interactive AWS profile switching with fzf.

Custom Packages

  • select-browser - KDialog browser picker when you have multiple browsers
  • deej - Hardware volume mixer for my Arduino-based physical sliders
  • Steam fixes, NordVPN wrapper, and other tweaks

Multi-Device Management

  • One flake runs on: gaming desktop (ZVIJER), ThinkPad T14, StarLabs laptop, HP Z420 server, Samsung Galaxy Fold 6 (via nix-on-droid)
  • Same config language everywhere. Add a new device, inherit the base, customize what's different.

File Manager

  • Yazi with 3D model previews (STL, OBJ files), video thumbnails, and custom status bar scripts.

The Config

300+ commits. Almost 2 years of work. This repo is by no means perfect. But compared to where it started, it's acceptable by my standards.

The beauty of NixOS? You could literally clone this repo and build my exact setup. Same packages, same configs, same everything. Then tweak it to your liking. That's the whole point - it's not just documentation, it's executable infrastructure.

git clone https://gitlab.com/stefan-matic/nixos-config.git
cd nixos-config
# Add your hardware-configuration.nix, adjust userSettings, and:
sudo nixos-rebuild switch --flake .#your-hostname

Feel free to steal whatever's useful.