2011-08-08 03:27:44 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
2011-08-08 03:34:36 +02:00
|
|
|
services.xserver.multitouch = {
|
|
|
|
|
2011-08-08 03:27:44 +02:00
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
2011-08-08 03:34:36 +02:00
|
|
|
description = "Whether to enable multitouch touchpad support.";
|
2011-08-08 03:27:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2011-08-08 03:34:36 +02:00
|
|
|
config = mkIf config.services.xserver.multitouch.enable {
|
2011-08-08 03:27:44 +02:00
|
|
|
|
2011-08-08 03:34:36 +02:00
|
|
|
services.xserver.modules = [ pkgs.xorg.xf86_input_multitouch ];
|
2011-08-08 03:27:44 +02:00
|
|
|
|
|
|
|
services.xserver.config =
|
|
|
|
''
|
2011-08-08 03:34:36 +02:00
|
|
|
# Automatically enable the multitouch driver
|
2011-08-08 03:27:44 +02:00
|
|
|
Section "InputClass"
|
2011-08-08 03:34:36 +02:00
|
|
|
MatchIsTouchpad "true"
|
|
|
|
Identifier "Multitouch Touchpad"
|
|
|
|
Driver "multitouch"
|
2011-08-08 03:27:44 +02:00
|
|
|
EndSection
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|