Is there a way to sync the nixos config between two slightly different machines?

I have two slightly different machines connected with a local network.

Most of their configurations are same, except for the ip addr, hostname, some modules for different hardware drivers.

My problem is that:
When I perform upgrading I have to run nixos-rebuild boot --upgrade separately on two machines. And each of them needs to download files from the binary cache.

Is there a better way let me

  1. run only one set of commands to upgrade two machines simultaneously?
  2. Share the files that are downloaded from the internet?

you need a deployment tool, I can recommend GitHub - serokell/deploy-rs: A simple multi-profile Nix-flake deploy tool.