g920 support on nixdesk

This commit is contained in:
xunuwu 2025-09-14 17:38:17 +02:00
parent 601e875be2
commit 72d057a4c1
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,25 @@
{pkgs, ...}: {
# hardware.usb-modeswitch.enable = true;
hardware.xpadneo.enable = true;
environment.systemPackages = with pkgs; [
oversteer
];
environment.etc = {
# Creates /etc/usb_modeswitch.d/046d:c261
"usb_modeswitch.d/046d:c261" = {
text = ''
# Logitech G920 Racing Wheel
DefaultVendor=046d
DefaultProduct=c261
MessageEndpoint=01
ResponseEndpoint=01
TargetClass=0x03
MessageContent="0f00010142"
'';
};
};
services.udev.extraRules = "ATTR{idVendor}==\"046d\", ATTR{idProduct}==\"c261\", RUN+=\"${pkgs.usb-modeswitch}/bin/usb_modeswitch -c '/etc/usb_modeswitch.d/046d\:c261'\"";
}