Add binfmt config for aarch64

This may be able to be refactored once this PR is merged:

https://github.com/NixOS/nixpkgs/pull/334859

This configuration is based on this config:

182ca2c66f/mod/binfmt.nix

linked from this comment:

https://github.com/NixOS/nixpkgs/issues/160300#issuecomment-2156003171
This commit is contained in:
Chandler Swift 2024-09-15 21:56:05 -05:00
parent 08958c0a78
commit 3fc3bd97f3
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -34,6 +34,13 @@
boot.plymouth.enable = true;
boot.plymouth.theme = "breeze";
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.binfmt.registrations.aarch64-linux = {
interpreter = "${pkgs.pkgsStatic.qemu-user.override { hostCpuTargets = ["aarch64-linux-user"]; }}/bin/qemu-aarch64";
wrapInterpreterInShell = false;
fixBinary = true;
};
boot.initrd.luks.devices."luks-ca2fdf0b-d385-498c-9f7d-f58368a65fd4".device = "/dev/disk/by-uuid/ca2fdf0b-d385-498c-9f7d-f58368a65fd4";
networking.hostName = "oscar"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.