From afb2fe70d7c07e3de6e26fdca154ad658f5f0132 Mon Sep 17 00:00:00 2001 From: larstvei Date: Fri, 29 Aug 2025 13:40:19 +0200 Subject: [PATCH] Disable internal keyboard when external (Voyager) is connected --- hosts/thinkpad/keyboard.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hosts/thinkpad/keyboard.nix b/hosts/thinkpad/keyboard.nix index b6d8033..ae62926 100644 --- a/hosts/thinkpad/keyboard.nix +++ b/hosts/thinkpad/keyboard.nix @@ -1,4 +1,12 @@ +{ pkgs, ... }: { + + # Disable internal keyboard when external (Voyager) is connected + services.udev.extraRules = '' + ACTION=="add", SUBSYSTEM=="input", KERNEL=="event*", ENV{DEVLINKS}=="*usb-ZSA_Technology_Labs_Voyager-event-kbd*", RUN+="${pkgs.kmod}/bin/modprobe -r atkbd" + ACTION=="remove", SUBSYSTEM=="input", KERNEL=="event*", ENV{DEVLINKS}=="*usb-ZSA_Technology_Labs_Voyager-event-kbd*", RUN+="${pkgs.kmod}/bin/modprobe atkbd" + ''; + services.kanata = { enable = true; keyboards = {