add qemu-bios script

This commit is contained in:
Sean Buckley 2022-06-29 17:01:30 -04:00
parent 8b45caeafc
commit d5e8da9acc

View file

@ -1,4 +1,14 @@
pkgs:
let
qemu-opts = builtins.concatStringsSep " " [
"${pkgs.qemu_kvm}/bin/qemu-kvm"
"-cpu host"
"-usbdevice tablet"
"-smp $(nproc)"
"-m 4096"
];
in
builtins.mapAttrs
(n: v: {
type = "app";
@ -13,7 +23,11 @@ builtins.mapAttrs
exec ${jupy}/bin/python -m jupyterlab "$@"
'';
qemu-bios = ''
exec ${qemu-opts} "$@"
'';
qemu-uefi = ''
exec ${pkgs.qemu_kvm}/bin/qemu-kvm -bios ${pkgs.OVMF.fd}/FV/OVMF.fd "$@"
exec ${qemu-opts} -bios ${pkgs.OVMF.fd}/FV/OVMF.fd "$@"
'';
}