3
0
Fork 0
forked from mirrors/nixpkgs

services.x11: Add option for additional InputClass sections.

Implement support for additional InputClass sections, e.g. for non
keyboard input devices.
This commit is contained in:
Daniel Ehlers 2015-04-12 23:49:48 +02:00
parent a4e63baf35
commit 057f01b11e

View file

@ -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}