There’s also a variety of third party remote deployment tools, I use deploy-rs personally.
All these tools fall back on nix-copy-closure under the hood, and then simply execute the activation script of the new generation via ssh. They differ mainly in how they execute the script and assert the remote is working afterwards.