nixos-pi icon indicating copy to clipboard operation
nixos-pi copied to clipboard

Using native Linux arm64 runner instead qemu

Open OmerFarukOruc opened this issue 11 months ago • 2 comments

Is it possible to use native arm64 instead using qemu (cross-compiling) to have faster build.

OmerFarukOruc avatar Mar 20 '24 16:03 OmerFarukOruc

What arm machine did you have? I think if the bottleneck is compilation (it didn't found most packages on caches), it depends on your processor speed.

What I found useful is that I can just use GH Action (even though it uses qemu cross compile), and then download the image. My default build took 6minutes.

Just recently I rebuild my images on macOS M2 -> under ARM Linux VM using VMWare (as NixOS guest vm). The difference is not significant, but useful when debugging issues. Probably because it is still as Linux under M2 emulation.

So in summary: very recommended, but speed depends on your proc.

lucernae avatar Mar 30 '24 13:03 lucernae

I've updated my recipe with Nix Flake, but unfortunately my Pi broke, so I have no way of testing the image.

If you are interested to help, check the new Nix Flake section.

If you have NixOS on ARM (or just Nix with Flake enabled), you can try executing the remote flake build to test the same recipe. On my GH Action runner, it took 14 minutes. https://github.com/lucernae/nixos-pi/actions/runs/8492722933/job/23266026115

If you have raspberry pi and can flash the resulting image, let me know whether the build+flash succeeded or not.

lucernae avatar Mar 30 '24 19:03 lucernae