If you are using an Apple Silicon laptop and you want to deploy to an x86-64 Linux box, this can get a bit annoying due needing to deal with cross compilation in nix.
You can easily spin up a linux builder vm or I just have a dedicated remote builder on my network which I offload to
You can have an x86-64 remote builder, or use a service like nixbuild.net, rather than use cross-compilation.
The Make target I use to deploy in this manner (MacBook to x86-64, single machine) is simply:
Which has been working well. I admit I do not understand what all of these flags do in detail.This uses ssh agent forwarding, and then sudo via PAM. That allows for passwordless sudo. Building (well, activating) without sudo is pretty involved last I checked, I could not get it to work.