fixes https://git.clan.lol/clan/clan-core/issues/3791
This fixes multiple issues we had when re-generating shared vars.
Problem 1: shared vars are re-generated for each individual machine instead of just once (see #3791)
Problem 2: When a shared var was re-generated for one machine, dependent vars on other machines did not get re-generated, leading to broken state
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5001
This is basically
<af7ce9b8ed>,
but with support for deploying locally.
This failed to install secrets to `/var/lib/sops-nix`. That's because
our `LocalHost` didn't have support for sudo yet. I fixed that.
Now the user can pass `--build-host local`, to select the local machine as a build host, in which case no ssh is used.
This means the admin machine does not necessarily have ssh set up to itself, which was confusing for many users.
Also this makes it easier to re-use a well configured nix remote build setup which is only available on the local machine. Eg if `--build-host local` nix' defaults for remote builds on that machine will be utilized.