I would like to know what’s the recommended tool for NixOS deployment. Let’s say I want to deploy a configuration (which I prepared locally) to a remote machine.
My first guess was just coping the files with scp or create an Ansible playbook, and running nixos-rebuild switch But there’s probably a better way…
nixos-rebuild can activate configurations on remote machines, see the wiki page for examples.
Other than that, there are multiple other deployment tools, such as NixOps, Morph, Colmena, deploy-rs, Nixinate, Bento, and others… All are a bit different in the functionality they provide, so the choice is up to you. I personally use Colmena.