From 4a0819805a6e389bb5e37a72d8d41345b1ad4a1a Mon Sep 17 00:00:00 2001 From: David Wood Date: Thu, 19 Dec 2019 12:26:45 +0000 Subject: [PATCH] wooting-udev-rules: init at 20190601 Signed-off-by: David Wood --- .../linux/wooting-udev-rules/default.nix | 23 +++++++++++++++++++ .../linux/wooting-udev-rules/wooting.rules | 9 ++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 pkgs/os-specific/linux/wooting-udev-rules/default.nix create mode 100644 pkgs/os-specific/linux/wooting-udev-rules/wooting.rules diff --git a/pkgs/os-specific/linux/wooting-udev-rules/default.nix b/pkgs/os-specific/linux/wooting-udev-rules/default.nix new file mode 100644 index 000000000000..49da843e3ad9 --- /dev/null +++ b/pkgs/os-specific/linux/wooting-udev-rules/default.nix @@ -0,0 +1,23 @@ +{ stdenv }: + +stdenv.mkDerivation rec { + pname = "wooting-udev-rules"; + version = "20190601"; + + # Source: https://wooting.helpscoutdocs.com/article/68-wootility-configuring-device-access-for-wootility-under-linux-udev-rules + src = [ ./wooting.rules ]; + + unpackPhase = ":"; + + installPhase = '' + install -Dpm644 $src $out/lib/udev/rules.d/70-wooting.rules + ''; + + meta = with stdenv.lib; { + homepage = https://wooting.helpscoutdocs.com/article/34-linux-udev-rules; + description = "udev rules that give NixOS permission to communicate with Wooting keyboards"; + platforms = platforms.linux; + license = "unknown"; + maintainers = with maintainers; [ davidtwco ]; + }; +} diff --git a/pkgs/os-specific/linux/wooting-udev-rules/wooting.rules b/pkgs/os-specific/linux/wooting-udev-rules/wooting.rules new file mode 100644 index 000000000000..d906df3d4c6a --- /dev/null +++ b/pkgs/os-specific/linux/wooting-udev-rules/wooting.rules @@ -0,0 +1,9 @@ +# Wooting One +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", MODE:="0660", GROUP="input" +# Wooting One update mode +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", MODE:="0660", GROUP="input" + +# Wooting Two +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", MODE:="0660", GROUP="input" +# Wooting Two update mode +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", MODE:="0660", GROUP="input" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 39b764537f7e..ab90b14e41f8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17052,6 +17052,8 @@ in wirelesstools = callPackage ../os-specific/linux/wireless-tools { }; + wooting-udev-rules = callPackage ../os-specific/linux/wooting-udev-rules { }; + wpa_supplicant = callPackage ../os-specific/linux/wpa_supplicant { }; wpa_supplicant_gui = libsForQt5.callPackage ../os-specific/linux/wpa_supplicant/gui.nix { };