Windows 11 vm audio issues + gpu passthrough question/help

i can’t get my audio to work in a windows 11 vm. before i reinstalled my nixos installation, the audio was working (for like the first minute after booting it wasn’t, but then it started working). but after reinstalling my pc and trying the vm again, i can’t get the audio to work in any way. i’ve spent like 3 hours on it and i don’t know what else to do.

i also tried to change the xml code, but i either got errors, it got reset back to the default settings, or it got applied, but either way, it didn’t fix the audio.

another thing i’d like to do is use my gpu in the vm (guest) but at the same time split the gpu on my host (nixos), or at least just get a display on the host so i can do basic tasks. i won’t be doing gpu-intensive work on my nixos setup while having the vm open, but splitting would be optimal.

i’m not sure if this is possible because, based on my research, some people say it is, while others say it isn’t.

for context i use an rx 7800 xt

my sys packages for vm stuff
environment.systemPackages = with pkgs; [
# vm
qemu_kvm
libvirt
virt-viewer
virt-manager
spice-gtk
spice-vdagent
];

my qemu.nix config:
{ config, pkgs, … }:
{
virtualisation = {
libvirtd = {
enable = true;
qemu.package = pkgs.qemu_kvm;
extraConfig = ‘’
unix_sock_group = “libvirt”
unix_sock_rw_perms = “0770”
‘’;
};
};

users = {
groups.libvirt = { };
users.patrik.extraGroups = [ “libvirt” ];
};
}

my audio.nix config:
{ config, pkgs, … }:

{
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
}