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
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