modules/rosetta: configure nix build sandbox to use rosetta

With this we can do x86_64 builds on aarch64
This commit is contained in:
Arian van Putten 2023-05-10 14:28:50 -04:00
parent f431ee4a85
commit a33d032939

View File

@ -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";