Skip to content

Instantly share code, notes, and snippets.

@matu3ba
Created April 11, 2022 10:31
Show Gist options
  • Save matu3ba/6422aff7e9ab8a4b4fab91e2c022386f to your computer and use it in GitHub Desktop.
Save matu3ba/6422aff7e9ab8a4b4fab91e2c022386f to your computer and use it in GitHub Desktop.
minimal instructions to install+use nixos with qemu
#qemu-img create -f qcow2 NOME.img XG
qemu-img create -f qcow2 nixos-test.img 20G
#qemu-system-x86_64 -boot d -cdrom image.iso -m 512 -hda mydisk.img
qemu-system-x86_64 -enable-kvm -boot d \
-cdrom nixos-minimal-21.11-x86_64-linux.iso \
-m 2G -cpu host -smp 2 -hda nixos-test.img
#usage
qemu-system-x86_64 -enable-kvm -boot d \
-m 2G -cpu host -smp 2 -hda nixos-test.img
/Ctrl-alt-g/ -> free the mouse from inside the image.
/Ctrl-alt-f/ -> toggle switch fullscreen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment