diff options
author | Arian van Putten <arian@mercury.com> | 2023-05-10 14:28:50 -0400 |
---|---|---|
committer | Arian van Putten <arian@mercury.com> | 2023-05-10 14:28:50 -0400 |
commit | a33d0329393471ab9ca79cae700cb9f5b750de76 (patch) | |
tree | c26469a11fbbea3cbc750ab0f177ed996cac438c /nixos/modules/virtualisation | |
parent | f431ee4a85cb985075b4ed27596913e8087f4264 (diff) |
modules/rosetta: configure nix build sandbox to use rosetta
With this we can do x86_64 builds on aarch64
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/rosetta.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/rosetta.nix b/nixos/modules/virtualisation/rosetta.nix index 109b114d649c5..ee811b571b8f8 100644 --- a/nixos/modules/virtualisation/rosetta.nix +++ b/nixos/modules/virtualisation/rosetta.nix @@ -50,11 +50,19 @@ in } ]; - fileSystems."${cfg.mountPoint}" = { + fileSystems."${cfg.mountPoint}" = { device = cfg.mountTag; fsType = "virtiofs"; }; + + nix.settings = { + extra-platforms = [ "x86_64-linux" ]; + extra-sandbox-paths = [ + "/run/binfmt" + cfg.mountPoint + ]; + }; boot.binfmt.registrations.rosetta = { interpreter = "${cfg.mountPoint}/rosetta"; |