udev: fix rules for my monsgeek m1

This commit is contained in:
Alexandre Cavalheiro 2024-09-15 22:32:44 -03:00
parent eacc272b69
commit 91098d29eb
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
3 changed files with 31 additions and 4 deletions

View file

@ -250,10 +250,16 @@ in
users = [ "wizardlink" ]; users = [ "wizardlink" ];
}; };
# Vial udev rule for Monsgeek M1 services.udev = {
services.udev.extraRules = '' # Vial udev rule for Monsgeek M1
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0005", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" extraRules = ''
''; # Monsgeek M1
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0005", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
# WB32 DFU rules - needed for flashing
packages = [ (pkgs.callPackage ./services/udev/wb32dfu.nix { }) ];
};
# enable a better driver for wireless xbox controllers. # enable a better driver for wireless xbox controllers.
hardware.xpadneo.enable = true; hardware.xpadneo.enable = true;

19
services/udev/wb32dfu.nix Normal file
View file

@ -0,0 +1,19 @@
{
stdenv,
}:
stdenv.mkDerivation {
pname = "wb32dfu-udev-rules";
version = "0-unstable-2024-09-15";
src = ./.;
dontBuild = true;
installPhase = ''
runHook preInstall
install -D wb32dfu.rules $out/lib/udev/rules.d/50-wb32dfu.rules
runHook postInstall
'';
}

View file

@ -0,0 +1,2 @@
# WB32 DFU
SUBSYSTEMS=="usb", ATTRS{idVendor}=="342d", ATTRS{idProduct}=="dfa0", TAG+="uaccess"