summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-06-20 10:29:40 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-06-20 10:29:40 +0200
commit5d640c6dbb9708296b761c8de89565043962c0a7 (patch)
tree8f32f308fc46568c4e2466484c413f5b5d6eb699
parent7f3bbba059828a8cb7962177ed737f4db2eb7209 (diff)
downloadnixos-5d640c6dbb9708296b761c8de89565043962c0a7.tar
nixos-5d640c6dbb9708296b761c8de89565043962c0a7.tar.gz
nixos-5d640c6dbb9708296b761c8de89565043962c0a7.tar.bz2
nixos-5d640c6dbb9708296b761c8de89565043962c0a7.tar.xz
nixos-5d640c6dbb9708296b761c8de89565043962c0a7.zip
...
-rw-r--r--overlays/uhk-agent.nix34
1 files changed, 0 insertions, 34 deletions
diff --git a/overlays/uhk-agent.nix b/overlays/uhk-agent.nix
deleted file mode 100644
index 4c0b7d5f..00000000
--- a/overlays/uhk-agent.nix
+++ /dev/null
@@ -1,34 +0,0 @@
1{ prev, sources, ... }:
2{
3 uhk-agent =
4 let
5 image = prev.stdenv.mkDerivation (sources.uhk-agent // {
6 buildCommand = ''
7 install -m 0644 $src $out
8 '';
9 });
10
11 appimage-run' = prev.appimage-run.override {
12 extraPkgs = p: with p; [
13 at-spi2-core
14 ];
15 };
16
17 runScript = prev.writeShellScript "run-uhk-agent" ''
18 exec -- ${appimage-run'}/bin/appimage-run ${image}
19 '';
20
21 udevRules = prev.writeText "uhk60.rules" ''
22 # Ultimate Hacking Keyboard rules
23 # These are the udev rules for accessing the USB interfaces of the UHK as non-root users.
24 # Copy this file to /etc/udev/rules.d and physically reconnect the UHK afterwards.
25 SUBSYSTEM=="input", GROUP="input", MODE="0664"
26 SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="612[0-7]", MODE:="0664", GROUP="plugdev"
27 KERNEL=="hidraw*", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="612[0-7]", MODE:="0664", GROUP="plugdev"
28 '';
29 in prev.runCommand "uhk-agent" {} ''
30 mkdir -p $out/bin $out/etc/udev/rules.d
31 install -m 0755 ${runScript} $out/bin/uhk-agent
32 install -m 0644 ${udevRules} $out/etc/udev/rules.d/50-uhk60.rules
33 '';
34}