How can I update a nixos-anywhere system?

I’m a bit confused. Is it possible to push an update for a nixos-anywhere system?

I tried to add a package to the flake, then push it, and it proceeds to format the whole drive again, wiping it clean;)

I know I can log into the system and switch to a flake, but the whole idea was that I was pushing the config to the system.

You don’t use nixos-anywhere after initial deployment.

nixos-rebuild supports remote deployment:

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.