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
main
Chandler Swift 2024-09-15 21:56:05 -05:00
parent 08958c0a78
commit 3fc3bd97f3
Signed by: chandlerswift
GPG Key ID: A851D929D52FB93F
1 changed files with 7 additions and 0 deletions

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.