Add vfio stuff for win10
Add a whole bunch of stuff to start/stop displays for the win10 vm Hopefully this will allow win10 to directly use the same GPU in passthru mode
This commit is contained in:
+20
-3
@@ -27,7 +27,7 @@ in
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
|
||||
"amdgpu"
|
||||
#"amdgpu"
|
||||
#"nvidia"
|
||||
#"nvidia_modeset"
|
||||
#"nvidia_uvm"
|
||||
@@ -35,6 +35,7 @@ in
|
||||
];
|
||||
kernelParams = [
|
||||
"amd_iommu=on"
|
||||
"iommu=pt"
|
||||
("vfio-pci.ids=" + (lib.concatStringsSep "," passthru))
|
||||
];
|
||||
};
|
||||
@@ -64,12 +65,28 @@ in
|
||||
wantedBy = pkgs.lib.mkForce [ ];
|
||||
serviceConfig.User = "root";
|
||||
};
|
||||
|
||||
"libvirtd-nosleep@" = {
|
||||
description = "Prevent sleep while %i is running";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.systemd}/bin/systemd-inhibit --what=sleep --why="Libvirt domain %i is running" --who=%U --mode=block sleep infinity
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
libvirtd.hooks.qemu =
|
||||
{
|
||||
libvirtd = {
|
||||
extraConfig = ''
|
||||
log_filters="1:qemu"
|
||||
log_outputs="1:file:/var/log/libvirt/libvirtd.log"
|
||||
'';
|
||||
hooks.qemu = {
|
||||
win10 = lib.getExe pkgs.qemu-hook;
|
||||
};
|
||||
};
|
||||
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user