Following the instructions here I added this to my build host’s configuration.nix:
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
And I tried to build my current config into an image, this failed with the ambiguous error.
However, even a generic generate without a specified conf fails with error: Target specification with 1 components is ambiguous
:
nixos-generate --system aarch64 -f sd-aarch64
error:
… while calling the 'seq' builtin
at /nix/store/990lzihr3amscp9df21spc8khdbn4ml6-nixos-23.11/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while evaluating a branch condition
at /nix/store/990lzihr3amscp9df21spc8khdbn4ml6-nixos-23.11/nixos/lib/modules.nix:261:9:
260| checkUnmatched =
261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
| ^
262| let
(stack trace truncated; use '--show-trace' to show the full trace)
error: Target specification with 1 components is ambiguous
Am I missing another step in the cross-compilation setup?