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
|
|
|
|
2012-03-20 02:56:39 +01:00
|
|
|
services.xserver.modules = [ pkgs.xf86_input_mtrack ];
|
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"
|
2012-03-20 02:48:09 +01:00
|
|
|
MatchIsTouchpad "on"
|
|
|
|
Identifier "Touchpads"
|
|
|
|
Driver "mtrack"
|
2011-08-08 03:27:44 +02:00
|
|
|
EndSection
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|