Skip to content

Instantly share code, notes, and snippets.

@runeksvendsen
Last active February 2, 2024 13:56
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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