I have nix installed on an Apple Silicon Mac, and I am trying to use it to build a Linux container image via pkgs.dockerTools.buildImage. The trouble is that one of the packages I want to include isn’t available in the build cache and needs to be built from source. I discovered nix’s remote builder functionality, but all of the examples of it that I’ve seen involve setting up credentials to connect to a persistent remote machine via ssh.
What I’d like to do instead is leverage Apple Container to spin up a temporary aarch64 or (via Rosetta 2) x86_64 Linux container locally to do the build when needed, without needing a persistent builder with SSH access. Are there any customization points in the remote builder functionality (or otherwise) that would allow me to achieve this?