Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions nixos/modules/services/x11/xserver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -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}
Expand Down