Split `hostname` and `user` into specific values 6337516c parent ca71f11c

Use as many different names for logically-distinct values as possible. The intent is to have them be "stringly-typed" values so an accidental replacement of one with another will raise an error and be noticed. The only places where this isn't done is when a name escapes out to be user-visible (eg: part of the user-facing "API"). Leave those to be the same "rosetta-builder" value to preserve a good user experience.

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
Split `hostname` and `user` into specific values
๐Ÿ‘€
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