From d5e8da9accbf867eb620082e674df6f1e6208958 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Wed, 29 Jun 2022 17:01:30 -0400 Subject: [PATCH] add qemu-bios script --- lib/apps.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/apps.nix b/lib/apps.nix index 6a6d983..5d26f04 100644 --- a/lib/apps.nix +++ b/lib/apps.nix @@ -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 "$@" ''; }