Skip to content

Instantly share code, notes, and snippets.

@runeksvendsen
Last active May 31, 2024 08:25
Show Gist options
  • Save runeksvendsen/427a8cae01c3b0ae71ebac41a71c902f to your computer and use it in GitHub Desktop.
Save runeksvendsen/427a8cae01c3b0ae71ebac41a71c902f to your computer and use it in GitHub Desktop.
# https://github.com/diddledani/macOS-Linux-VM-with-Rosetta#setting-up-rosetta
# 1. Run `sudo mkdir /var/run/rosetta`
# 2. Run `sudo mount -t virtiofs ROSETTA /var/run/rosetta`
# 3. Add the snippet below to /etc/nixos/configuration.nix
boot.binfmt.registrations.rosetta = {
interpreter = /var/run/rosetta/rosetta;
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00'';
mask = ''\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
matchCredentials = true;
preserveArgvZero = false;
fixBinary = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment