From dc630fe984cef113cd896bf0c83ac2b9ba821706 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Fri, 6 Feb 2026 09:16:05 +0100 Subject: [PATCH] refactor: simplify keyboard module --- modules/keyboard/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/keyboard/default.nix b/modules/keyboard/default.nix index 1d5dc4a..244a4e0 100644 --- a/modules/keyboard/default.nix +++ b/modules/keyboard/default.nix @@ -1,13 +1,16 @@ { pkgs, ... }: +with pkgs; +let + tools = interception-tools; + caps2esc = interception-tools-plugins.caps2esc; +in { services.interception-tools = { enable = true; - plugins = [ - pkgs.interception-tools-plugins.caps2esc - ]; + plugins = [ caps2esc ]; udevmonConfig = '' - - JOB: ${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc -m 1 | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE + - JOB: ${tools}/bin/intercept -g $DEVNODE | ${caps2esc}/bin/caps2esc -m 1 | ${tools}/bin/uinput -d $DEVNODE DEVICE: EVENTS: EV_KEY: [KEY_CAPSLOCK]