mirror of Team/StarlightOS at forge.starlightnet.work

Build and VM testing Guide#

This assumes you have both nix installed as well as flakes enabled. We use the nixos CLI internally, but you can use the default nixos-rebuild CLI too.

The installer can be built using either of those commands:

nixos apply .#installer --vm --output result
# or
nixos-rebuild build-vm --flake .#installer

You can then run the VM like this:

# create a qcow2 disk image first
# note: running this command again will overwrite your virtual disk
qemu-img create -f qcow root.qcow2 20G

# run the VM with QEMU
QEMU_KERNEL_PARAMS=console=ttyS0 QEMU_OPTS="-hdd $PWD/root.qcow2" ./result/bin/run-slos-vm -nographic

You should then have it booting in your terminal.