diff --git a/modules/virtualisation/virtualbox-guest.nix b/modules/virtualisation/virtualbox-guest.nix index eecae8dc7b56..9f215e816563 100644 --- a/modules/virtualisation/virtualbox-guest.nix +++ b/modules/virtualisation/virtualbox-guest.nix @@ -45,6 +45,21 @@ in exec = "${kernel.virtualboxGuestAdditions}/sbin/VBoxService --foreground"; }; + services.xserver.videoDrivers = mkOverride 50 [ "virtualbox" ]; + + services.xserver.config = + '' + Section "InputDevice" + Identifier "VBoxMouse" + Driver "vboxmouse" + EndSection + ''; + + services.xserver.serverLayoutSection = + '' + InputDevice "VBoxMouse" + ''; + }; }