diff options
author | Arian van Putten <arian.vanputten@gmail.com> | 2023-05-11 14:21:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 14:21:54 -0400 |
commit | 6c0935d46645a0553d4331119dff89a45ffe2a62 (patch) | |
tree | 13546a8cffbb724cf9645e42369f34c1b6ef6e27 /nixos/modules/virtualisation | |
parent | 9a142a6244446986ea9910933f3a1f86a17a3054 (diff) | |
parent | a33d0329393471ab9ca79cae700cb9f5b750de76 (diff) |
Merge pull request #231140 from NixOS/rosetta-nix-build
modules/rosetta: configure nix build sandbox to use rosetta
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"; |