1
0
forked from extern/nix-config

nix: Simplify

This commit is contained in:
Donovan Glover 2023-06-12 13:40:56 -04:00
parent a2886940f4
commit 9692307bd9
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -1,16 +1,17 @@
{ pkgs, ... }: { { pkgs, ... }: {
services.interception-tools = { services.interception-tools = {
enable = true; enable = true;
plugins = [ pkgs.interception-tools-plugins.dual-function-keys ]; plugins = with pkgs.interception-tools-plugins; [ dual-function-keys ];
udevmonConfig = ''
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c /etc/dual-function-keys.yaml | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE" udevmonConfig = with pkgs; /* yaml */ ''
- JOB: "${interception-tools}/bin/intercept -g $DEVNODE | ${interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c /etc/dual-function-keys.yaml | ${interception-tools}/bin/uinput -d $DEVNODE"
DEVICE: DEVICE:
EVENTS: EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC] EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
''; '';
}; };
environment.etc."dual-function-keys.yaml".text = '' environment.etc."dual-function-keys.yaml".text = /* yaml */ ''
TIMING: TIMING:
- TAP_MILLISEC: 1000 - TAP_MILLISEC: 1000
- DOUBLE_TAP_MILLISEC: 0 - DOUBLE_TAP_MILLISEC: 0