Merge pull request #7347 from sargon/pr-x11

services.x11: Add option for additional InputClass sections.

Changed files
+21
nixos
modules
services
+21
nixos/modules/services/x11/xserver.nix
···
'';
};
+
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 = [];
···
Option "XkbOptions" "${cfg.xkbOptions}"
Option "XkbVariant" "${cfg.xkbVariant}"
EndSection
+
+
# Additional "InputClass" sections
+
${flip concatMapStrings cfg.inputClassSections (inputClassSection: ''
+
Section "InputClass"
+
${inputClassSection}
+
EndSection
+
'')}
+
Section "ServerLayout"
Identifier "Layout[all]"