summary refs log tree commit diff
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorNiklaus Giger <niklaus.giger@member.fsf.org>2022-05-08 22:40:52 +0200
committerGitHub <noreply@github.com>2022-05-08 22:40:52 +0200
commit1d82f62aefd35988d9210942bbfeff1f677970d1 (patch)
tree99ea8fbbb5a98c3986fda246ed7236741fb85d3c /nixos/modules/hardware
parent2f677eae73fd58b85dcd82f85002c8550adc0a59 (diff)
downloadnixpkgs-1d82f62aefd35988d9210942bbfeff1f677970d1.tar
nixpkgs-1d82f62aefd35988d9210942bbfeff1f677970d1.tar.gz
nixpkgs-1d82f62aefd35988d9210942bbfeff1f677970d1.tar.bz2
nixpkgs-1d82f62aefd35988d9210942bbfeff1f677970d1.tar.lz
nixpkgs-1d82f62aefd35988d9210942bbfeff1f677970d1.tar.xz
nixpkgs-1d82f62aefd35988d9210942bbfeff1f677970d1.tar.zst
nixpkgs-1d82f62aefd35988d9210942bbfeff1f677970d1.zip
UHK-agent: Support for Ultimate Hacking Keyboard udev-rules and configuration application (#132420)
* maintainers: add ngiger

* uhk-agent: init at 1.5.17

* Apply suggestions from code review

* Update pkgs/os-specific/linux/uhk-agent/default.nix

* Apply suggestions from code review

* Update pkgs/os-specific/linux/uhk-agent/default.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/keyboard/uhk.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/modules/hardware/keyboard/uhk.nix b/nixos/modules/hardware/keyboard/uhk.nix
new file mode 100644
index 00000000000..bf2d739c3a9
--- /dev/null
+++ b/nixos/modules/hardware/keyboard/uhk.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+  cfg = config.hardware.keyboard.uhk;
+in
+{
+  options.hardware.keyboard.uhk = {
+    enable = mkEnableOption ''
+    non-root access to the firmware of UHK keyboards.
+      You need it when you want to flash a new firmware on the keyboard.
+      Access to the keyboard is granted to users in the "input" group.
+      You may want to install the uhk-agent package.
+    '';
+
+  };
+
+  config = mkIf cfg.enable {
+    services.udev.packages = [ pkgs.uhk-udev-rules ];
+  };
+}