splitbrain.org

electronic brain surgery since 2001

Some thoughts on NixOS

NixOS Logo

I love the idea of a declarative server setup. I always thought this should be implemented as something more like Ansible, but having it directly at the core of the distribution makes things easier I guess.

So in the last couple of days I gave NixOS a closer look.

The thing about Nix is, that at first it looks like the declarative part of it is just a somewhat more complex YAML configuration. But it is actually a complete programming language. But not a nice one. It's one of those weird functional ones only academics seem to like. I don't know – I wish this was all less ugly.

From the outside it seem the project lacks a bit of steering and direction. For example, people seem to think flakes1) are the proper way to do things and I guess it makes sense. But flakes have been marked experimental for years now and official docs still seem not to be sure which way to go. The same is true for nix-command – a new command line utility supposed to unify different CLIs2). As a newbie I'm not sure if I should stick to what is official or run experimental stuff?

Documentation feels messy, too. There's an official and an unofficial wiki. Both seem to basically cover the same topics. I don't know about the history here but why would a tiny community split their documentation efforts like this? But then again there's also two ways to search for packages and config stuff with mynixos.com and search.nixos.org. Both often return barely any info about an individual package except that it exists – I wish these tools would be combined with the wikis.

On the other hand the promise of a declarative server setup seems to hold and I think I will give it a try in “production” on my new NAS.

Would I use this for a desktop? Not anytime soon.3)

Tags:
linux, nixos
Similar posts:
1)
flakes basically seem to do two things: separate concerns instead of using a monolithic configuration and adding a lock file to the package stage, similar to what npm's package.lock does
2)
similar to what apt did to apt-get and dpkg
3)
I'm using Arch btw. 😜

Comments