mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
add qemu-bios script
This commit is contained in:
parent
8b45caeafc
commit
d5e8da9acc
1 changed files with 15 additions and 1 deletions
16
lib/apps.nix
16
lib/apps.nix
|
@ -1,4 +1,14 @@
|
||||||
pkgs:
|
pkgs:
|
||||||
|
let
|
||||||
|
qemu-opts = builtins.concatStringsSep " " [
|
||||||
|
"${pkgs.qemu_kvm}/bin/qemu-kvm"
|
||||||
|
"-cpu host"
|
||||||
|
"-usbdevice tablet"
|
||||||
|
"-smp $(nproc)"
|
||||||
|
"-m 4096"
|
||||||
|
];
|
||||||
|
|
||||||
|
in
|
||||||
builtins.mapAttrs
|
builtins.mapAttrs
|
||||||
(n: v: {
|
(n: v: {
|
||||||
type = "app";
|
type = "app";
|
||||||
|
@ -13,7 +23,11 @@ builtins.mapAttrs
|
||||||
exec ${jupy}/bin/python -m jupyterlab "$@"
|
exec ${jupy}/bin/python -m jupyterlab "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
qemu-bios = ''
|
||||||
|
exec ${qemu-opts} "$@"
|
||||||
|
'';
|
||||||
|
|
||||||
qemu-uefi = ''
|
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 "$@"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue