Using Nix

Apparently, it's been a few months since I've blogged about anything. That isn't to say I wasn't thinking about it. I would find myself working on a little bit of code and think “this would be something interesting to talk about” or come up on a post about elitism that I want to respond. But then… it didn't happen.

The last four month have been probably one of the hardest I've had in a long time, even over the struggles of 2020's derecho and pandemic. It started with just a bit of stress at work, but then something got dumped on top of it. And then something on top of that, then on that, and then on that. At one point, for every time I took off my task list, two more were added.

A good example is while I was fixing Partner's toilet that wasn't flushing (just a simple stalk replacement) and our youngest comes up the stairs because the downstairs toilet basically exploded (water pouring out of the bottom, ruptured wax seal, no longer flushing, soaking the carpet). I've been trying to get around to it for almost two months and just removed the carpet today to find out how much drywall damage was done.

There was a lot more, but going through them just turns into a story like Willard (2003) where the main character starts off in the dump, for a brief moment sees hope, and then plunges even further into the hole. Since I try to keep my blog posts positive, let's just go with that.

One of those bright points was getting Merger of Evil published. Shannon has always been a fantastic author and I'm glad I got to see the sequel to Minion of Evil in print. Plus, the cover is fantastic (even if I didn't do it).

My brother says my life is frequently a “that's good, that's bad” game. while I was able to do my part in getting Merger of Evil out, I was unable to finish Second-Hand Dresses or Flight of the Scions out this year, which I wanted to. The reasons are worth of a different post, but basically I had to scoop things off my pile to avoid drowning.

Working on Merger of Evil hit a couple of technical annoyances. A few months ago, I started using asdf to let me switch environments more fluidly. The project for Merger seemed like a great place to use that, but somewhere in that time, there were some updates to Node and various packages that turned a minor maintenance task into something far more complicated simply because I couldn't get into the right head space.

As a side note, when I was forced from my apartment in 2008 because of the flood in Cedar Rapids, I had a few months of high stress that also made things difficult to function. Much like the the last few months, minor problems became complicated when there were dozens of other things competition for my time and attention. When I got back to my apartment, I found that my old life didn't quite fit anymore. My daily ritual of going through 20-30 web comics and sites then seemed pointless so I purged my RSS feed, I stopped playing Kingdom of Loathing, and basically had to review what “sparked joy” in my life.

Those technical annoyances got me to thinking about improvements. Yeah, I had a bunch of other things demanding my attention, but optimizing a process is one of the ways I reduce stress (along with rewriting problems) and I desperately needed that distraction. As things were, someone on my social feed started talking about migrating from asdf to Nix. Nix is a lot like the old GNU Stow but had a much better package management and, more importantly, allowed me to have seamless transitions to different versions. Nix also is more of a holistic approach since one could use flakes to wrap everything including specific Node, Python, and C# packages into a single unified whole.

After a few weeks of using Nix, I can say that it definitely solves the little nits and scratches that asdf had plus handles my need for reproducible/consistent builds. I'm sure there are other problems with it, starting with the complexity of the setup files and the fact the featuers I want are still in beta, but I think I'm going to stay with it and see if it works out.

Things are still in flux and life is still heaping up on my shoulders, which means there is only one thing I can do: break apart the problems as much as I can and then focus on one thing at a time.