executable_nixos.sh 1.0 KB

123456789101112131415161718192021
  1. #!/bin/sh
  2. # mount -t 9p -o trans=virtio v_tmp /mnt
  3. # -vga qxl \
  4. # -spice port=5930,disable-ticketing \
  5. # -device virtio-serial-pci \
  6. # -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
  7. exec qemu-system-x86_64 \
  8. -enable-kvm \
  9. -net nic,model=virtio \
  10. -net user,hostfwd=tcp::12022-:22,hostfwd=tcp::12080-:80 \
  11. -virtfs local,path=/nix/store,security_model=none,mount_tag=TAG_nix_store \
  12. -chardev spicevmc,id=spicechannel0,name=vdagent \
  13. -drive file=/nixos-qemu-image,if=virtio,cache=writeback,werror=report \
  14. -m 4096 \
  15. -daemonize \
  16. -display none \
  17. "$@"