summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorDaniel Ehlers <danielehlers@mindeye.net>2015-04-12 23:49:48 +0200
committerDaniel Ehlers <danielehlers@mindeye.net>2015-04-12 23:49:48 +0200
commit057f01b11ecc8c2a9ea1c3139293dbe2eeec3951 (patch)
tree4baf14e56a82f7ce5cef73aada6bc6e570cbcffe /nixos
parenta4e63baf3502137740edf165239f676a9c832d06 (diff)
downloadnixlib-057f01b11ecc8c2a9ea1c3139293dbe2eeec3951.tar
nixlib-057f01b11ecc8c2a9ea1c3139293dbe2eeec3951.tar.gz
nixlib-057f01b11ecc8c2a9ea1c3139293dbe2eeec3951.tar.bz2
nixlib-057f01b11ecc8c2a9ea1c3139293dbe2eeec3951.tar.lz
nixlib-057f01b11ecc8c2a9ea1c3139293dbe2eeec3951.tar.xz
nixlib-057f01b11ecc8c2a9ea1c3139293dbe2eeec3951.tar.zst
nixlib-057f01b11ecc8c2a9ea1c3139293dbe2eeec3951.zip
services.x11: Add option for additional InputClass sections.
Implement support for additional InputClass sections, e.g. for non
keyboard input devices.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/xserver.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 64e0d4d8050e..9be7bffaac10 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -147,6 +147,19 @@ in
         '';
       };
 
+      inputClassSections = mkOption {
+        type = types.listOf types.lines;
+        default = [];
+        example = [ ''
+           Identifier      "Trackpoint Wheel Emulation"
+           MatchProduct    "ThinkPad USB Keyboard with TrackPoint"
+           Option          "EmulateWheel"          "true
+           Option          "EmulateWheelButton"    "2"
+           Option          "Emulate3Buttons"       "false"
+	  '' ];
+        description = "Content of additional InputClass sections of the X server configuration file.";
+      };
+
       modules = mkOption {
         type = types.listOf types.path;
         default = [];
@@ -522,6 +535,14 @@ in
           Option "XkbVariant" "${cfg.xkbVariant}"
         EndSection
 
+	# Additional "InputClass" sections
+        ${flip concatMapStrings cfg.inputClassSections (inputClassSection: ''
+        Section "InputClass"
+          ${inputClassSection}
+        EndSection
+        '')}
+
+
         Section "ServerLayout"
           Identifier "Layout[all]"
           ${cfg.serverLayoutSection}