forked from pub-solar/os
Update USB mouse configuration for chocoaltebar VM guests
This commit is contained in:
parent
992fc5ad9a
commit
4d28cb191d
|
@ -24,6 +24,7 @@ in
|
|||
|
||||
services.openssh.openFirewall = true;
|
||||
networking.firewall.allowedTCPPorts = [ 443 ] ++ (if psCfg.sway.vnc.enable then [ 5901 ] else [ ]);
|
||||
networking.firewall.allowedUDPPorts = [ 43050 ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wayvnc
|
||||
|
|
|
@ -53,8 +53,8 @@ in
|
|||
|
||||
${if vm.handOverUSBDevices then ''
|
||||
# Hand over mouse
|
||||
USB_BUS=5
|
||||
USB_DEV=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c52b | grep 'Bus 005' | cut -b 18)
|
||||
USB_BUS=3
|
||||
USB_DEV=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c52b | grep "Bus 00''${USB_BUS}" | 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/.*/<address bus=\"''${USB_BUS}\" device=\"''${USB_DEV}\" \/>/" "$TMP_FILE"
|
||||
|
||||
|
|
Loading…
Reference in a new issue