From d6169284c46d751726a356be31ac77d52676eae2 Mon Sep 17 00:00:00 2001 From: Marcello Sylvester Bauer Date: Mon, 4 Nov 2019 13:02:08 +0100 Subject: nixos/libinput: apply options to all device types Instead of assign the libinput options to touchpad devices only, it should be appied by any device using libinput. Due to the fact that `40-libinput.conf` already defines libinput as driver for any detected input device, we can use `MatchDriver` to appy options. --- nixos/modules/services/x11/hardware/libinput.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix index 4a25232383d..71065dfc26b 100644 --- a/nixos/modules/services/x11/hardware/libinput.nix +++ b/nixos/modules/services/x11/hardware/libinput.nix @@ -209,12 +209,12 @@ in { services.xserver.config = '' - # Automatically enable the libinput driver for all touchpads. + # General libinput configuration. + # See CONFIGURATION DETAILS section of man:libinput(4). Section "InputClass" Identifier "libinputConfiguration" - MatchIsTouchpad "on" + MatchDriver "libinput" ${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''} - Driver "libinput" Option "AccelProfile" "${cfg.accelProfile}" ${optionalString (cfg.accelSpeed != null) ''Option "AccelSpeed" "${cfg.accelSpeed}"''} ${optionalString (cfg.buttonMapping != null) ''Option "ButtonMapping" "${cfg.buttonMapping}"''} -- cgit 1.4.1