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:39:26 +02:00
|
|
|
services.xserver.modules = [ pkgs.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"
|
2011-09-14 20:20:50 +02:00
|
|
|
Driver "multitouch"
|
2011-08-08 03:27:44 +02:00
|
|
|
EndSection
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|