My guess would be the deterministic configuration management. If it’s for a personal machine then do what you want to make it your own but if it’s an organization (e.g. government) you want the machines to be as similar as possible to reduce maintenance. Think cattle, not pets.
I mean they sort of serve different purposes. You can build a NixOS ISO running your exact desired configuration that is good to go immediately upon install. Ansible would require post install configuration, yes it is scripted but it is additional overhead and time. I think a better alternative would be an OCI based distro with a Packer build pipeline, which could include Ansible steps higher up in the build process. But that’s more complexity that Nix wouldn’t require
My guess would be the deterministic configuration management. If it’s for a personal machine then do what you want to make it your own but if it’s an organization (e.g. government) you want the machines to be as similar as possible to reduce maintenance. Think cattle, not pets.
Ansible is a thing though. It is also a more complete, mature and easily substitutable solution vs pinning your hopes on a single distro.
Programmers like NixOS because they are programmers.
Ansible is US-owned. Even though it’s open source, Redhat, a US company, is the one that controls its lifecycle.
NixOS is based out of the EU.
Fun fact, Nix, Nixpkg and NixOS have their roots in the Netherlands. For example, Nixpkg was even described in a PhD thesis at Utrecht University.
i used ansible some years ago and i’m using nixos currently and you can not compare those two.
i was not fluent in ansible and i’m not fluent in nixos. yes you have to leave your comfort zone for nixos, but your get so so much more.
the jinja templates in yaml feel like a big hack if you used nixos.
would really be interesting to hear someone talk who is comfortable to use both of them.
I mean they sort of serve different purposes. You can build a NixOS ISO running your exact desired configuration that is good to go immediately upon install. Ansible would require post install configuration, yes it is scripted but it is additional overhead and time. I think a better alternative would be an OCI based distro with a Packer build pipeline, which could include Ansible steps higher up in the build process. But that’s more complexity that Nix wouldn’t require
It’s close, but Ansible is often not deterministic.