aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-01-23 21:23:44 +0100
committerKarel Kočí <cynerd@email.cz>2023-01-23 21:23:44 +0100
commitf49a81ef79a2100cbae46bb9a5227ab140b04951 (patch)
tree8fcaaf4b25fec79edc15f66892ee8c7cd94b298b
parent89a605727649bb4599af04681e40a19bf24e69a4 (diff)
downloadnixos-personal-f49a81ef79a2100cbae46bb9a5227ab140b04951.tar.gz
nixos-personal-f49a81ef79a2100cbae46bb9a5227ab140b04951.tar.bz2
nixos-personal-f49a81ef79a2100cbae46bb9a5227ab140b04951.zip
nixos/compile: use emualted systems again
The original use was to get binfmt in chroot without copying qemu to chrooted store but let's just copy it over.
-rw-r--r--nixos/modules/compile.nix22
1 files changed, 2 insertions, 20 deletions
diff --git a/nixos/modules/compile.nix b/nixos/modules/compile.nix
index 6a6b7b2..45cc9e6 100644
--- a/nixos/modules/compile.nix
+++ b/nixos/modules/compile.nix
@@ -18,26 +18,8 @@ with lib; {
max-jobs = 32;
cores = 0;
};
- boot.binfmt.registrations = {
- aarch64-linux = {
- fixBinary = true;
- wrapInterpreterInShell = false;
- interpreter = (lib.systems.elaborate {system = "aarch64-linux";}).emulator pkgs;
- 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";
- };
- armv7l-linux = {
- fixBinary = true;
- wrapInterpreterInShell = false;
- interpreter = (lib.systems.elaborate {system = "armv7l-linux";}).emulator pkgs;
- 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";
- };
- };
- nix.settings.extra-platforms = [
- "aarch64-linux"
- "armv7l-linux"
- ];
+
+ boot.binfmt.emulatedSystems = ["armv7l-linux" "aarch64-linux"];
environment.systemPackages = with pkgs; [
# Tools