Setting up NixOS in VMware Fusion Public Tech Preview 22H2
August 5, 2022 ◦ 2 min ◦
On the macOS host:
- Install and start Docker Desktop for Mac
git clone https://github.com/normful/nixos-config.git
cd nixos-config && make iso/nixos.iso
- Install VMware Fusion Public Tech Preview 22H2
In VMware Fusion:
- Install from disc or image
- Choose
nixos.iso
- Select Linux -> Other Linux 5.x kernel 64-bit Arm
- Click Customize Settings
- Type a better name into the Save As field.
- Display:
- Network Adapter -> Connect Network Adapter -> Share with my Mac (default)
- Hard Disk:
- Sound Card -> Remove Sound Card
- Camera -> Remove Camera
- Start VM
On the VM:
- Press enter to start the installer (default selection). This will run https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh
- For some strange reason, at one point, it was running into an error trying to mount
/mnt-root
even though/mnt-root
was not even mounted in latter attempts that succeeded.
- For some strange reason, at one point, it was running into an error trying to mount
setfont ter-v32n
to use a larger font.- Switch into into the
root
user:sudo su
- Set the
root
user password toroot
:passwd
- Write down IP address from
ip a
output.
On the host:
- Fill in
NIXADDR
in theMakefile
using the IP address. make vm/boostrap0
and wait it to finish and reboot.docker run -it --rm alpine mkpasswd -m sha-512
and copy the password hash tonixos-config/users/norman/nixos.nix
inusers.users.norman.hashedPassword
.- Copy
~/.ssh/id_ed25519.pub
tonixos-config/users/norman/nixos.nix
inusers.users.norman.openssh.authorizedKeys.keys
. make vm/boostrap
and wait it to finish and reboot.