{ config, pkgs, lib, ... }: let inherit (pkgs) qemu; in { boot.binfmtMiscRegistrations = { arm = { interpreter = "${qemu}/bin/qemu-arm"; magicOrExtension = ''\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00''; mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff''; }; aarch64 = { interpreter = "${qemu}/bin/qemu-aarch64"; magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00''; mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff''; }; }; nix = { extraOptions = '' extra-platforms = i686-linux armv6l-linux armv7l-linux aarch64-linux ''; sandboxPaths = [ "/run/binfmt" "${qemu}" ]; }; }