NixOS on ARM: Difference between revisions
imported>Samueldr m Fix model name |
imported>Elmarx update/fix the name of the binfmt package |
||
Line 475: | Line 475: | ||
If you are building on non-NixOS machine with QEMU binfmt wrapper configured, you will want to configure nix daemon to let it know that it can build for aarch64. Add the following line to <code>/etc/nix/nix.conf</code>: | If you are building on non-NixOS machine with QEMU binfmt wrapper configured, you will want to configure nix daemon to let it know that it can build for aarch64. Add the following line to <code>/etc/nix/nix.conf</code>: | ||
<code>extra-platforms = aarch64-linux arm-linux</code> | <code>extra-platforms = aarch64-linux arm-linux</code> | ||
{{note| archlinux users can install <code>extra/qemu-system-aarch64</code>, <code>extra/qemu-user-static</code> and <code>extra/ | {{note| archlinux users can install <code>extra/qemu-system-aarch64</code>, <code>extra/qemu-user-static</code> and <code>extra/qemu-user-static-binfmt</code> | ||
and restart <code>systemd-binfmt.service</code>. Check if binfmt is loaded by <code>ls /proc/sys/fs/binfmt_misc/</code> (there must be <code>qemu-aarch64</code> or needed architecture) and add line <code><nowiki>extra-sandbox-paths = /usr/bin/qemu-aarch64</nowiki></code> to <code>/etc/nix/nix.conf</code>}} | and restart <code>systemd-binfmt.service</code>. Check if binfmt is loaded by <code>ls /proc/sys/fs/binfmt_misc/</code> (there must be <code>qemu-aarch64</code> or needed architecture) and add line <code><nowiki>extra-sandbox-paths = /usr/bin/qemu-aarch64</nowiki></code> to <code>/etc/nix/nix.conf</code>}} | ||