mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-29 19:54:48 +01:00
qemu: Add audio support to virtual machines
This fixes an issue where virtual machines would previously use dummy output. More specifically, pulseaudio is used since pipewire supports it, and intel hd audio (hda) is used since it's generally regarded as one of the better options based on information available online. Note that -audio is used instead of the outdated -audiodev and -soundhw options. This setup also avoids the choppy audio observed with other solutions like alsa. References: - https://www.qemu.org/docs/master/system/qemu-manpage.html - https://github.com/NixOS/nixpkgs/issues/175378 - https://superuser.com/questions/1337570 - https://en.wikipedia.org/wiki/Intel_High_Definition_Audio - https://gitlab.com/qemu-project/qemu/-/issues/1519 - https://lists.nongnu.org/archive/html/qemu-discuss/2020-04/msg00089.html
This commit is contained in:
parent
b2ff95f11b
commit
168134bcf3
@ -236,7 +236,7 @@ let VARIABLES = import ./variables.nix; in {
|
|||||||
cores = 4;
|
cores = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.qemu.options = [ "-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen" ];
|
virtualisation.qemu.options = [ "-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen" "-audio pa,model=hda" ];
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
WLR_NO_HARDWARE_CURSORS = "1";
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
|
Loading…
Reference in New Issue
Block a user