A few months ago a friend showed me a Linux distribution called [[NixOS]]. I was immediately hooked by the idea. The two things that intrigued me the most where:
Especially the last one was the main reason why I wanted to try it. I tried to configure my systems a lot with [[Ansible]] but I often run into the problem that I didn’t implement a change and then I wasn’t able to rebuild systems or that the state between systems was inconsistent. In addition with Ansible you don’t have an easy option to remove things. You basically you have to do the tasks in reverse in order to remove the old configuration. With Docker it got a bit easier to have a consistent state on my servers but on my laptop I was still forgetting to update the Ansible role.
When my friend told me how NixOS worked it just made so much more sense.
The fact that the configuration is symlinked read-only to the required places just forces you do use the system in the right way.
And the declarative way makes it much easier to have a consistent configuration across various machines and applying that configuration to other machines is as easy as running git pull && sudo NixOS-rebuild switch
on the remote machines.
Another thing I noticed after a few test, was that the idle resource usage of NixOS was much lower than what I’ve seen so far from [[Ubuntu]] or [[Debian]]. Both systems in the screenshot are running the same application in [[Docker]] but the resource usage is wildly different.
Ubuntu
NixOS
Going forward there are still a lot of things I plan on doing: