Create user in activation script 97f242ec parent 413f6ac6

Create a proper service account (which wasn't possible with `users.users."${darwinUser}"`): * No password. * No photo. * No user-editable attributes (like password, photo, etc).

authored by Chris Pick

๐Ÿ‘€
.gitignore
Switch to qcow2 image
๐Ÿ‘€
1 year ago
๐Ÿ‘€
README.md
Rename `lima-builer` -> `rosetta-buidler`
๐Ÿ‘€
1 year ago
๐Ÿ‘€
flake.lock
`nix flake update` 1 year ago
๐Ÿ‘€
flake.nix
Create user in activation script
๐Ÿ‘€
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