Closed RossComputerGuy closed 1 year ago
Please specify how you are building it. Cloning this repository on the latest commit (5567b99acd07e7069fb7e074f19d5ead10409798) then running nix build .#m1n1
works fine for me on x86_64-linux.
I would expect to see ARCH=aarch64-unknown-linux-gnu-
in your build flags in a cross-compilation scenario.
https://github.com/RossComputerGuy/dotfiles/blob/master/flake.nix#L43 Added this repo as an overlay
It does not sound like you have cross-compilation set up properly then. Here is how it is set up in this repo: https://github.com/tpwrules/nixos-apple-silicon/blob/5567b99acd07e7069fb7e074f19d5ead10409798/flake.nix#L39-L46
You should not need to build m1n1 yourself this way unless you are planning to debug an attached Apple Silicon machine using the m1n1 hypervisor and a specially-installed machine? I don't immediately see the point of including it in a dotfiles setup like this.
Oh ok, it almost sounded like from the docs that m1n1 is needed for setting up a device. I assume I won't have an issue building m1n1 on aarch64-linux
? I might need it when building my distro and adding M-series support.
Not sure what you mean by "my distro", but if you want to run NixOS on Apple Silicon on a particular machine, you only need to import the Apple Silicon support module into your NixOS configuration (once the machine has been set up in the docs). You don't need to build m1n1 yourself.
I suggest going through the docs step by step, then adding the necessary bits to your personal configuration to integrate with the machine once it boots and NixOS runs okay on it.
Not sure what you mean by "my distro",
I'm building my own distro based around NixOS but heavily modified. I'm hoping to use an M-series mac to develop the OS and compile it on it.
I suggest going through the docs step by step, then adding the necessary bits to your personal configuration to integrate with the machine once it boots and NixOS runs okay on it.
That's what I've done but atm I'm having to use idevicerestore to restore my device after accidentally typing the -o
argument instead of -p
with sgdisk
.
I'm not sure there is anything actionable here for me. You can use the .nix files in this repo in your distro under the MIT license. But it sounds like there was an issue with the cross-compilation instantiation that was breaking in your particular scenario.