I am trying to remotely build and re-configure an x86_64-linux system from an aarch64-darwin host.
The host has configured remote builders as such:
# nix config show
...
builders = ssh://bldr aarch64-linux; ssh://bldr x86_64-linux; ssh://bldr-majestic aarch64-linux; ssh://bldr-majestic x86_64-linux;
...
However, attempts to use nixos-rebuild boot|switch ... result in a platform mismatch:
# nixos-rebuild boot \
--log-format internal-json \
--verbose --flake .#vainglory --target-host "vainglory" \
--max-jobs 0 \
|& nom --json
...
subprocess.CalledProcessError: Command '['nix', '--extra-experimental-features', 'nix-command flakes', 'build', '--print-out-paths', '.#nixosConfigurations."vainglory".config.system.build.toplevel', '--no-link', '-v', '--max-jobs', '0', '--log-format', 'internal-json']' returned non-zero exit status 1.
┏━ 161 Errors:
⋮
┃ Reason: local builds are disabled (max-jobs = 0)
┃ Hint: set 'max-jobs' to a non-zero value to enable local builds, or configure remote builders via 'builders'
┃ Reason: platform mismatch
┃ Required system: 'x86_64-linux'
┃ Current system: 'aarch64-darwin'
┃ error: Cannot build '/nix/store/kg0pdbqaxlac7nmgv1wr31484b1bjzy0-X-Restart-Triggers-dhcpcd.drv'.
┃ Reason: local builds are disabled (max-jobs = 0)
┃ Hint: set 'max-jobs' to a non-zero value to enable local builds, or configure remote builders via 'builders'
┃ Reason: platform mismatch
┃ Required system: 'x86_64-linux'
┃ Current system: 'aarch64-darwin'
┃ error: Cannot build '/nix/store/xdsa8lg8j3m4r0rmw7dhkkwlihxjlbyg-NetworkManager.conf.drv'.
┃ Reason: local builds are disabled (max-jobs = 0)
┃ Hint: set 'max-jobs' to a non-zero value to enable local builds, or configure remote builders via 'builders'
┃ Reason: platform mismatch
┃ Required system: 'x86_64-linux'
┃ Current system: 'aarch64-darwin'
Not quite sure what’s going on here. It’s worked in past without issue.