From 3fc3bd97f3c8221df22bf5415c923e4487846864 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 15 Sep 2024 21:56:05 -0500 Subject: [PATCH] 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: https://github.com/jcaesar/sysflake/blob/182ca2c66ff0d1bcd4ba5f3032cca97bbb32da59/mod/binfmt.nix linked from this comment: https://github.com/NixOS/nixpkgs/issues/160300#issuecomment-2156003171 --- oscar/configuration.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 23d0fd6..476881e 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -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.