From 20feba70837d736cb7f87a9892d74dfdcd453434 Mon Sep 17 00:00:00 2001 From: Linus Karl Date: Wed, 20 Nov 2024 17:55:55 +0100 Subject: [PATCH 1/5] wooting-udev-rules: update udev rules --- .../by-name/wo/wooting-udev-rules/package.nix | 6 +- .../wo/wooting-udev-rules/wooting.rules | 99 ++----------------- 2 files changed, 12 insertions(+), 93 deletions(-) diff --git a/pkgs/by-name/wo/wooting-udev-rules/package.nix b/pkgs/by-name/wo/wooting-udev-rules/package.nix index 8231e3e3ea331..5636537607bbe 100644 --- a/pkgs/by-name/wo/wooting-udev-rules/package.nix +++ b/pkgs/by-name/wo/wooting-udev-rules/package.nix @@ -2,9 +2,9 @@ stdenv.mkDerivation rec { pname = "wooting-udev-rules"; - version = "unstable-2023-03-31"; + version = "0-unstable-2024-11-20"; - # Source: https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/ + # Source: https://help.wooting.io/article/147-configuring-device-access-for-wootility-under-linux-udev-rules src = [ ./wooting.rules ]; dontUnpack = true; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - homepage = "https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/"; + homepage = "https://help.wooting.io/article/147-configuring-device-access-for-wootility-under-linux-udev-rules"; description = "udev rules that give NixOS permission to communicate with Wooting keyboards"; platforms = platforms.linux; license = "unknown"; diff --git a/pkgs/by-name/wo/wooting-udev-rules/wooting.rules b/pkgs/by-name/wo/wooting-udev-rules/wooting.rules index 365627fa1aec1..2ea36da2b7305 100644 --- a/pkgs/by-name/wo/wooting-udev-rules/wooting.rules +++ b/pkgs/by-name/wo/wooting-udev-rules/wooting.rules @@ -1,96 +1,15 @@ # Wooting One Legacy -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", MODE:="0660", GROUP="input" +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess" +SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess" # Wooting One update mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", MODE:="0660", GROUP="input" +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess" # Wooting Two Legacy -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", MODE:="0660", GROUP="input" +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess" +SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess" # Wooting Two update mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", MODE:="0660", GROUP="input" +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", TAG+="uaccess" -# Wooting One -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1100", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1100", MODE:="0660", GROUP="input" -# Wooting One Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1101", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1101", MODE:="0660", GROUP="input" -# Wooting One 2nd Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1102", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1102", MODE:="0660", GROUP="input" - -# Wooting Two -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1200", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1200", MODE:="0660", GROUP="input" -# Wooting Two Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1201", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1201", MODE:="0660", GROUP="input" -# Wooting Two 2nd Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1202", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1202", MODE:="0660", GROUP="input" - -# Wooting Lekker -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1210", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1210", MODE:="0660", GROUP="input" -# Wooting Lekker Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1211", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1211", MODE:="0660", GROUP="input" -# Wooting Lekker 2nd Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1212", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1212", MODE:="0660", GROUP="input" - -# Wooting Lekker update mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="121f", MODE:="0660", GROUP="input" - -# Wooting Two HE -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1220", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1220", MODE:="0660", GROUP="input" -# Wooting Two HE Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1221", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1221", MODE:="0660", GROUP="input" -# Wooting Two HE 2nd Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1222", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1222", MODE:="0660", GROUP="input" - -# Wooting Two HE update mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="122f", MODE:="0660", GROUP="input" - -# Wooting Two HE (ARM) -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1230", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1230", MODE:="0660", GROUP="input" -# Wooting Two HE Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1231", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1231", MODE:="0660", GROUP="input" -# Wooting Two HE 2nd Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1232", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1232", MODE:="0660", GROUP="input" - -# Wooting Two HE (ARM) update mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="123f", MODE:="0660", GROUP="input" - -# Wooting 60HE -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1300", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1300", MODE:="0660", GROUP="input" -# Wooting 60HE Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1301", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1301", MODE:="0660", GROUP="input" -# Wooting 60HE 2nd Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1302", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1302", MODE:="0660", GROUP="input" - -# Wooting 60HE update mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="130f", MODE:="0660", GROUP="input" - -# Wooting 60HE (ARM) -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1310", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1310", MODE:="0660", GROUP="input" -# Wooting 60HE (ARM) Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1311", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1311", MODE:="0660", GROUP="input" -# Wooting 60HE (ARM) 2nd Alt-gamepad mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1312", MODE:="0660", GROUP="input" -SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1312", MODE:="0660", GROUP="input" - -# Wooting 60HE (ARM) update mode -SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="131f", MODE:="0660", GROUP="input" +# Generic Wootings +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="uaccess" +SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", TAG+="uaccess" From b325158bc2a6a442ba03fa7c3cae428d430d23ab Mon Sep 17 00:00:00 2001 From: Linus Karl Date: Wed, 20 Nov 2024 17:59:50 +0100 Subject: [PATCH 2/5] wooting: update module description --- nixos/modules/hardware/wooting.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/hardware/wooting.nix b/nixos/modules/hardware/wooting.nix index 101bd2d32010e..fa39474da1f2c 100644 --- a/nixos/modules/hardware/wooting.nix +++ b/nixos/modules/hardware/wooting.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, ... }: { - options.hardware.wooting.enable = lib.mkEnableOption ''support for Wooting keyboards. - Note that users must be in the "input" group for udev rules to apply''; + options.hardware.wooting.enable = lib.mkEnableOption "support for Wooting keyboards"; config = lib.mkIf config.hardware.wooting.enable { environment.systemPackages = [ pkgs.wootility ]; From 21ccd4badf052dbebf6b04ceb463585425ef28f5 Mon Sep 17 00:00:00 2001 From: Linus Karl Date: Wed, 20 Nov 2024 18:04:19 +0100 Subject: [PATCH 3/5] wooting-udev-rules: add returntoreality to maintainers --- pkgs/by-name/wo/wooting-udev-rules/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/wo/wooting-udev-rules/package.nix b/pkgs/by-name/wo/wooting-udev-rules/package.nix index 5636537607bbe..0bdd12f32028d 100644 --- a/pkgs/by-name/wo/wooting-udev-rules/package.nix +++ b/pkgs/by-name/wo/wooting-udev-rules/package.nix @@ -18,6 +18,9 @@ stdenv.mkDerivation rec { description = "udev rules that give NixOS permission to communicate with Wooting keyboards"; platforms = platforms.linux; license = "unknown"; - maintainers = with maintainers; [ davidtwco ]; + maintainers = with maintainers; [ + davidtwco + returntoreality + ]; }; } From 5c104311486f4a5ee51595f6656d6457abda081b Mon Sep 17 00:00:00 2001 From: Linus Karl Date: Thu, 21 Nov 2024 09:57:59 +0100 Subject: [PATCH 4/5] wootility: 4.6.21 -> 4.7.2 --- pkgs/by-name/wo/wootility/package.nix | 31 ++++++++++++++++----------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/wo/wootility/package.nix b/pkgs/by-name/wo/wootility/package.nix index 265f7f9c35ce1..bfcb9e13944e4 100644 --- a/pkgs/by-name/wo/wootility/package.nix +++ b/pkgs/by-name/wo/wootility/package.nix @@ -1,15 +1,16 @@ -{ appimageTools -, fetchurl -, lib -, makeWrapper +{ + appimageTools, + fetchurl, + lib, + makeWrapper, }: let pname = "wootility"; - version = "4.6.21"; + version = "4.7.2"; src = fetchurl { url = "https://s3.eu-west-2.amazonaws.com/wooting-update/wootility-lekker-linux-latest/wootility-lekker-${version}.AppImage"; - sha256 = "sha256-ockTQLZWbYvsLzv+D0exD5W/yMaIdse4/JQshbkVzAU="; + sha256 = "sha256-2xIiSMFyJjmjBQ6GJYtc0VbZkTadV2Ov/mXQcJ8yq2U="; }; in @@ -19,8 +20,10 @@ appimageTools.wrapType2 { nativeBuildInputs = [ makeWrapper ]; extraInstallCommands = - let contents = appimageTools.extract { inherit pname version src; }; - in '' + let + contents = appimageTools.extract { inherit pname version src; }; + in + '' wrapProgram $out/bin/wootility \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" @@ -35,16 +38,20 @@ appimageTools.wrapType2 { export LC_ALL=C.UTF-8 ''; - extraPkgs = pkgs: with pkgs; ([ - xorg.libxkbfile - ]); + extraPkgs = + pkgs: with pkgs; ([ + xorg.libxkbfile + ]); meta = { homepage = "https://wooting.io/wootility"; description = "Customization and management software for Wooting keyboards"; platforms = lib.platforms.linux; license = lib.licenses.unfree; - maintainers = with lib.maintainers; [ davidtwco sodiboo ]; + maintainers = with lib.maintainers; [ + davidtwco + sodiboo + ]; mainProgram = "wootility"; }; } From 65216ff4f3fac48ee4f37ce6f7ff6d10edca7a6d Mon Sep 17 00:00:00 2001 From: Linus Karl Date: Thu, 21 Nov 2024 09:59:05 +0100 Subject: [PATCH 5/5] wootility: add returntoreality to maintainers --- pkgs/by-name/wo/wootility/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/wo/wootility/package.nix b/pkgs/by-name/wo/wootility/package.nix index bfcb9e13944e4..116cba157912f 100644 --- a/pkgs/by-name/wo/wootility/package.nix +++ b/pkgs/by-name/wo/wootility/package.nix @@ -51,6 +51,7 @@ appimageTools.wrapType2 { maintainers = with lib.maintainers; [ davidtwco sodiboo + returntoreality ]; mainProgram = "wootility"; };