b12f restructure #1
|
@ -53,9 +53,10 @@ in
|
|||
|
||||
${if vm.handOverUSBDevices then ''
|
||||
# Hand over mouse
|
||||
USB_DEV=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c52b | grep 'Bus 001' | cut -b 18)
|
||||
USB_BUS=5
|
||||
USB_DEV=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c52b | grep 'Bus 005' | cut -b 18)
|
||||
LINE_NUMBER=$(cat $TMP_FILE | grep -n -A 1 0xc52b | tail -n 1 | cut -b 1,2,3)
|
||||
sed -i "''${LINE_NUMBER}s/\(.\{33\}\)./\1''${USB_DEV}/" "$TMP_FILE"
|
||||
sed -i "''${LINE_NUMBER}s/.*/<address bus=\"''${USB_BUS}\" device=\"''${USB_DEV}\" \/>/" "$TMP_FILE"
|
||||
|
||||
# Hand over keyboard
|
||||
USB_BUS=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c328 | cut -b 7)
|
||||
|
|
|
@ -9,7 +9,7 @@ let
|
|||
|
||||
isolateGPU = "rx550x";
|
||||
memory = 48; # in GB
|
||||
handOverUSBDevices = false;
|
||||
handOverUSBDevices = true;
|
||||
|
||||
isolateAnyGPU = isolateGPU != null;
|
||||
in
|
||||
|
|
|
@ -190,7 +190,7 @@ in
|
|||
<source>
|
||||
<vendor id='0x046d'/>
|
||||
<product id='0xc328'/>
|
||||
<address bus='1' device='2'/>
|
||||
<address bus='1' device='1'/>
|
||||
</source>
|
||||
<address type='usb' bus='0' port='4'/>
|
||||
</hostdev>
|
||||
|
@ -198,7 +198,7 @@ in
|
|||
<source>
|
||||
<vendor id='0x046d'/>
|
||||
<product id='0xc52b'/>
|
||||
<address bus='1' device='3'/>
|
||||
<address bus='1' device='1'/>
|
||||
</source>
|
||||
<address type='usb' bus='0' port='5'/>
|
||||
</hostdev>
|
||||
|
|
Loading…
Reference in a new issue