After using nix in my dotfiles for over 2 years, I’m now moving away from it.

Here’s why.

Important

This post is not intended to be a “hot take”.

It merely contains my opinions, based on my experience, and it’s perfectly normal to disagree.

That being said, let’s get to it.

1. It takes over everything

I started by using nix-darwin and home-manager on my Mac. It’s fun! It makes sure things are in the right places and in sync with my dotfiles folder, preventing me from editing things outside of it (e.g. Editing a file linked by nix), which I think is kind of nice.

The problem with it is that it requires you to nixify everything.

For instance, you can’t use Lazy, Mason, or tpm, because the folders are owned by nix, and are read-only. So, you have to install these plugins using nix as well.

This basically means that you won’t always be able to simply put the configuration files you already have in home-manager, you’ll have to edit them quite a bit.

Desktop apps didn’t work too well either, as the nix way is to create a symlink to a Nix Apps folder inside your ~/Applications folder - which Spotlight makes sure to ignore.

So, while it takes over everything, I still had to use Homebrew to install desktop apps, or apps not available/too outdated in nix.

2. Outdated packages

Speaking of outdated, this is the other problem I found: Even nix-unstable is usually lagging behind quite a bit, which is OK most of the time, right up until the time it isn’t.

You can always package things yourself, for instance, by copying the latest version of the .nix file from nixpkgs, changing the versions, and building it - which is a lot of work, and might not do it for you in some cases, for example, if it depends on a newer version of some library that also isn’t available. You might find yourself having to update several packages, and it’s not fun.

At the same time it’s outdated, using unstable is… well, as the name implies, unstable. Things break often, which turns a “quick update” into a half-hour adventure.

I just got tired of it, eventually, especially because applying changes takes too long, which is also my next point:

3. Slow applies

Most of the times I change something in my dotfiles, I’m either adding/removing a package, or editing some configuration file.

At least one of these should be instant, but applying it always takes a long time, at least a couple of minutes - which feels excruciatingly long when you adding a simple key map in your neovim configuration.

This makes sense if reproducibility is important to you, but I found out that:

4. Reproducibility just isn’t that important to me

While nix’ value proposition is to be hermetic and reproducible, that’s not something I need on my personal computers, especially if the cost of it is deemed too high.

Let’s be honest: the whole reproducibility thing is only useful when setting up a new machine. The problem with that is:

  1. Most of us change machines what, once a year, tops?
  2. Unless you’re actively testing your setup every couple of weeks, do you actually know it’ll work properly on a new machine, should the time come?

In my experience, in the last 10 years, I changed laptops maybe 4 times. One of them was last year, post-nix, and, surprise, surprise, it didn’t “just work”, because I had never really tested it that way. I still had to fiddle around with it, and then I lied to myself, “next time it’ll be better” - but I didn’t really know that, and I guess now I’ll never will.

I also never reverted to a previous generation, usually preferring to fix it instead.

That all being said: I worry a lot more about my backups missing something than installing a bunch of packages and linking some configuration files.

5. Waste of disk space

The nix store is always using multiple gigabytes of disk space - which is especially expensive on a Mac, which is why most of us don’t get the models with many terabytes.

It was very common for it to be, in my case, >60G, which sounds insane given what I actually had installed.

For comparison, the entirety of /opt/homebrew/, with all of the same packages installed, is still less than 6G.

Note

Before someone says anything: yes, I was always running nix-collect-garbage.

6. Contributing packages is quite hard

The nixpkgs repository is comically large. I have a copy of it that I cloned a while ago with --depth 1, and then updated it a couple of times, and it sits at 4.7G large.

I dread the day I had to git fetch in there to contribute something, which in turn made me not want to contribute as much.

Still, I did contribute a couple of times. Although, I feel like every time I did, I spent more time waiting for git than actually doing the thing I wanted to do…

7. K.I.S.S.

Well, these are my reasons - I’m sure the internet will point out exactly where I’m wrong (and I probably am to some degree, somewhere in there), but in any case, I figured I’m a simple guy, who likes simple things - nix is not simple, so maybe it just isn’t for me, at least not for this use case.

Still, making things overly complicated felt good in the beginning because I was learning things, and, for what is worth, I still think nix, and especially nixOS, has its place when you really need something reproducible - it’s just that that is not something I care about on my laptop as much as I thought I did.

Future

To replace nix, I wrote a short shell script that definitely isn’t perfect, but does the thing for me, and I deem it good enough.

I’m back to installing all packages with Homebrew on my Mac. For the Linux boxes - they’re still running NixOS - I might change that eventually, though.

I know this way doesn’t fill all the boxes when comparing to nix, and I don’t want it to: I want it to be simple - and that’s exactly what it is.