From fb821aa7224e3016ab27c05831fe90a3db38c778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 14 Feb 2022 10:50:26 +0100 Subject: [PATCH] Update virtualisation --- hosts/chocolatebar/virtualisation/create-service.nix | 4 ++-- hosts/chocolatebar/virtualisation/default.nix | 2 +- hosts/chocolatebar/virtualisation/guest-xml.nix | 2 +- modules/virtualisation/default.nix | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hosts/chocolatebar/virtualisation/create-service.nix b/hosts/chocolatebar/virtualisation/create-service.nix index 0bc3349..04fd0d5 100644 --- a/hosts/chocolatebar/virtualisation/create-service.nix +++ b/hosts/chocolatebar/virtualisation/create-service.nix @@ -48,12 +48,12 @@ in sed -i "s/UUID/''${UUID}/" "$TMP_FILE" ${if vm.handOverUSBDevices then '' - # Hand over keyboard + # Hand over mouse USB_DEV=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c52b | grep 'Bus 001' | 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" - # Hand over mouse + # Hand over keyboard USB_BUS=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c328 | cut -b 7) USB_DEV=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c328 | cut -b 18) LINE_NUMBER=$(cat $TMP_FILE | grep -n -A 1 0xc328 | tail -n 1 | cut -b 1,2,3) diff --git a/hosts/chocolatebar/virtualisation/default.nix b/hosts/chocolatebar/virtualisation/default.nix index 730e5a9..bea0d38 100644 --- a/hosts/chocolatebar/virtualisation/default.nix +++ b/hosts/chocolatebar/virtualisation/default.nix @@ -6,7 +6,7 @@ let createService = import ./create-service.nix; isolateGPU = "rx550x"; - handOverUSBDevices = false; + handOverUSBDevices = true; isolateAnyGPU = isolateGPU != null; in diff --git a/hosts/chocolatebar/virtualisation/guest-xml.nix b/hosts/chocolatebar/virtualisation/guest-xml.nix index d158332..d4fe2ad 100644 --- a/hosts/chocolatebar/virtualisation/guest-xml.nix +++ b/hosts/chocolatebar/virtualisation/guest-xml.nix @@ -198,7 +198,7 @@ in -
+
diff --git a/modules/virtualisation/default.nix b/modules/virtualisation/default.nix index 4d58862..ad3db4e 100644 --- a/modules/virtualisation/default.nix +++ b/modules/virtualisation/default.nix @@ -19,7 +19,7 @@ in virtualisation.libvirtd = { enable = true; - qemuOvmf = true; + qemu.ovmf.enable = true; }; users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] { extraGroups = [ "libvirtd" ];