Files
nix-config/modules/hardware/input/disable-ibm-trackpoint.org
T
phundrak ba018ef841 refactor: change to litterate config
Configuration is now held by the `.org` files. All `.nix` files are
tangled from the org-mode files.
2026-10-06 12:40:58 +02:00

31 lines
1.1 KiB
Org Mode
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#+title: Disable the IBM TrackPoint
#+setupfile: ../../headers
* Disable the IBM TrackPoint
My ThinkPads come with IBM’s TrackPoint, the little red nub sitting
between the =G=, =H= and =B= keys. I don’t want it active, though, it has a
drift and I cannot fix it unless I change my keyboard. Thus, this
module exposes a way to turn it off. Here’s the skeleton of the
=nixos.disable-ibm-trackpoint= module.
#+begin_src nix :tangle yes
{
flake.modules.nixos.disable-ibm-trackpoint = {
<<udev-rule>>
};
}
#+end_src
** Disabling the TrackPoint
The TrackPoint shows up to the input stack as a regular pointer
device, so to disable it I can’t simply blacklist a driver — libinput
and friends would still pick it up through =evdev=. Instead, I match it
by its device name and clear the =ID_INPUT=, =ID_INPUT_MOUSE= and
=ID_INPUT_POINTINGSTICK= udev properties on it, which tells the input
stack to simply ignore the device as a pointing device.
#+name: udev-rule
#+begin_src nix
services.udev.extraRules = ''
ATTRS{name}=="*TPPS/2 IBM TrackPoint", ENV{ID_INPUT}="", ENV{ID_INPUT_MOUSE}="", ENV{ID_INPUT_POINTINGSTICK}=""
'';
#+end_src