Merge pull request #75940 from davidtwco/wooting-init

wooting: init wootility, wooting-udev-rules and module
This commit is contained in:
Matthew Bauer 2020-03-22 02:03:52 -04:00 committed by GitHub
commit b94300945a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
{
options.hardware.wooting.enable =
mkEnableOption "Enable support for Wooting keyboards";
config = mkIf config.hardware.wooting.enable {
environment.systemPackages = [ pkgs.wootility ];
services.udev.packages = [ pkgs.wooting-udev-rules ];
};
}

View File

@ -64,6 +64,7 @@
./hardware/tuxedo-keyboard.nix
./hardware/usb-wwan.nix
./hardware/onlykey.nix
./hardware/wooting.nix
./hardware/video/amdgpu.nix
./hardware/video/amdgpu-pro.nix
./hardware/video/ati.nix

View File

@ -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 ];
};
}

View File

@ -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"

View File

@ -0,0 +1,32 @@
{ appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3, udev, wooting-udev-rules }:
let
pname = "wootility";
version = "3.3.3";
in
appimageTools.wrapType2 rec {
name = "${pname}-${version}";
src = fetchurl {
url = "https://s3.eu-west-2.amazonaws.com/wooting-update/wootility-linux-latest/wootility-${version}.AppImage";
sha256 = "1qdiacwnvqahqkrhwnblz0jjywn63c6ndl3z450myhx5x55fdcja";
};
profile = ''
export LC_ALL=C.UTF-8
export XDG_DATA_DIRS="${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS"
'';
multiPkgs = extraPkgs;
extraPkgs =
pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ ([ udev wooting-udev-rules ]);
extraInstallCommands = "mv $out/bin/{${name},${pname}}";
meta = with lib; {
homepage = https://wooting.io/wootility;
description = "Wootility is customization and management software for Wooting keyboards.";
platforms = [ "x86_64-linux" ];
license = "unknown";
maintainers = with maintainers; [ davidtwco ];
};
}

View File

@ -7299,6 +7299,8 @@ in
woof = callPackage ../tools/misc/woof { };
wootility = callPackage ../tools/misc/wootility { };
wpscan = callPackage ../tools/security/wpscan { };
wsmancli = callPackage ../tools/system/wsmancli {};
@ -17468,6 +17470,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 { };