← 2025

Between my decked out window manager, terminal, and editor setups, along with countless other helpful scripts and commands, I would honestly attribute like ~40% of my cumulative productivity to my computer setup. My previous Linux distribution of choice - Arch Linux - has absolutely carried me through, among many other things, my relatively hellish mathematics and computer science undergraduate degrees. And yet, I'm relieved to have finally ditched Arch Linux for the one, the only, NixOS. I'm confident I will never look back. Why!?

Well, I am an incredibly busy guy! I have many things going on my life, of which cumulatively require I use my time incredibly well. I desperately want to avoid a Linux Evening – that is, my computer critically malfunctions and I must spend some time, "an evening," fixing it.

Why Arch Linux Sucks

Arch Linux, as a distribution, is generally an excellent distribution for avoiding Linux evenings. Becuase of the distro's super minimalist nature and well-supported ecosystem, things generally just work:tm: on Arch. All, except for long-term package management. When I install a package or update my system with Pacman -Syu or Yay -S [AUR package], the behavior is kinda nondeterministic. The billion electron package versions on my system might come into conflict, the new version of gcc might just be cooked, the NetworkManager systemd service might mysteriously just not come up, lightdm or xserver might have some random unresolved dependency issue and prevent the system from booting, some random dynamically linked binary might lose a random library it needs, etc etc etc. The list just goes on, and on, and on. Don't get me wrong, I'm extremely fluent with Linux internals at this point, and I can fix these issues pretty quickly. But, my fixes were always hacky and ad-hoc. Being a busy student, I just wanted to get back to the work I was doing before my system decided to eat shit.

So, naturally, I sought to avoid the nondeterministic update process, especially during the semester. I would rarely, if ever, update my system. And when I finally would pull the trigger, I'd be forced to go on like a two hour-long bug-fixing whack-a-mole adventure. My system began to rot - over four years of Arch Linux, everything grew increasingly fragile and challenging to maintain.

The Princeton Incident

At this point, I knew about NixOS and its declarativity, immutability, and generationality. But, I am a busy undergrad, and NixOS is hard. I just didn't have the time to invest. I consistently told myself, "yes, once I graduate, I will finally switch to NixOS." It took running into an unfixable issue for the very first time in my linux career that sufficiently radicalized me. Let me tell you about that.

I was at Princeton's admitted PhD student visit day, posted up in Princeton's Frist campus center, when some random dude-bro frat-bro type of guy accidentally spilled his florescent energy drink all over my laptop. My laptop's backlight instantly cut out, and that was that. Honestly, this wasn't such a big blow - my "hack" to overcome this, which I've used in the past, was to hot-swap my SSD from my old laptop to a backup. This worked perfectly fine when I switched my SSD from an x1 carbon gen 6 to a thinkpad T480s, both computers with 8th generation intel i7s. But, this time, I was hot-swapping from the aforementioned thinkpad T480s to an x1 carbon gen 5, moving from an 8th generation i7 to a 7th generation i7. And, oh my fucking god, what a mistake this would be.

When I made the switch, I rebuilt all my packages, reinstalled all the relevant drivers, and recompiled big, important programs (i.e. gcc) to account for the new architecture. But, for whatever reason, the iGPU driver was permanently fucked, and there was nothing I could do about it. Reader, I tried every trick in the book, but nothing worked. Every program that required GPU acceleration would randomly, nondeterminisically, segfault. Firefox? Segfault. Discord? Segfault. Anything electron-based? Segfault. Virtual machines? Segfault. Alacritty? I actually learned to disable its OpenGL features. All my scientific computing libraries? You guessed it, segfault. It's not like I could reinstall either! I was in the dead middle of my last semester of university, entirely inundated with finishing up my degree(s). So, I lived with it, up until I finished my very last assignment. Then, absolutely fucking gloriously, I dropped Arch Linux for NixOS. My awesome config, which is essentially the nix-ified version of my old Arch config, is available here.

Some Conclusions

In summary, what is wrong with Arch, and why does Nix solve my problems?

Although Pacman and the AUR are awesome, extremely long-term management of a busy system, as well as replication of that config to another hard drive, is all-but impossible. Sure, you can use btrfs to take filesystem-level snapshots, but it's hard to set up, maintain, and replicate across systems. Therefore Arch Linux installs are prone to ROT over time.

Now, why does nix solve my problems?

Yes, Nix and NixOS took months to learn. I spent literally 6 months getting my NixOS config to a usable state. But, I think it is certainly worth it. I figured, if I am going to be relying on my personal computing experience for my the rest of my professional career, why should I settle for anything but the best?

← 2025