Consistently name variables and move to innermost scopes ca71f11c parent 12996a74

* Move variables to the innermost scope possible * Use `linux` and `darwin` prefixes to separate hypervisor and VM * Use `{File,Dir}Path` and `{File,Dir}Name` suffixes to separate absolute paths

authored by Chris Pick

๐Ÿ‘€
.gitignore
Switch to qcow2 image
๐Ÿ‘€
1 year ago
๐Ÿ‘€
README.md
Rename `lima-builer` -> `rosetta-buidler`
๐Ÿ‘€
1 year ago
๐Ÿ‘€
flake.lock
Generate raw-efi image as default package 1 year ago
๐Ÿ‘€
flake.nix
Consistently name variables and move to innermost scopes
๐Ÿ‘€
1 year ago

README.md

rosetta-builder

Lima-based, Rosetta 2-enabled, Apple silicon (macOS/Darwin)-hosted Linux builder.

Setup

Build image:

nix build '.#packages.aarch64-linux.default'
mkdir -p ~/rosetta-builder/ssh{,d}keys
ssh-keygen -C 'builder@localhost' -f ~/rosetta-builder/builder_ed25519 -N '' -t ed25519
ssh-keygen -C 'root@rosetta-builer' -f ~/rosetta-builder/ssh_host_ed25519_key -N '' -t ed25519
mv ~/rosetta-builder/builder_ed25519 ~/rosetta-builder/ssh_host_ed25519_key.pub ~/rosetta-builder/sshkeys/
mv ~/rosetta-builder/builder_ed25519.pub ~/rosetta-builder/ssh_host_ed25519_key ~/rosetta-builder/sshdkeys/

Usage

Create and start VM (optionally add --video for console):

limactl start --tty=false --foreground builder.yaml

Periodic informational messages like the following are expected:

Waiting for the essential requirement 1 of 2: โ€œsshโ€ โ€ฆ

SSH:

ssh -p 2226 -i ~/rosetta-builder/sshkeys/builder_ed25519 builder@localhost

Delete VM:

limactl delete -f builder