Copying packages to a remote Nix store

This is useful if your local machine is powerful and you have built a number of packages on it, but want to re-use them on another machine, without using a Nix cache or rebuilding them.

nix copy --to ssh-ng://[email protected] /nix/store/???

If you use nixci, this looks like:

nixci . -- --option system aarch64-linux | xargs nix copy --to ssh-ng://[email protected]