Applied patch sent by justbeingglad long ago..

svn path=/nixos/trunk/; revision=11833
This commit is contained in:
Michael Raskin 2008-05-16 07:32:00 +00:00
parent ad3dc29f6d
commit b5451023a2
2 changed files with 26 additions and 19 deletions

View File

@ -1216,19 +1216,26 @@
";
};
isSynaptics = mkOption {
default = false;
example = true;
description = "
Whether to replace mouse with touchpad.
";
};
devSynaptics = mkOption {
default = "/dev/input/event0";
description = "
Event device for Synaptics touchpad.
";
synaptics = {
enable = mkOption {
default = false;
example = true;
description = "
Whether to replace mouse with touchpad.
";
};
dev = mkOption {
default = "/dev/input/event0";
description = "
Event device for Synaptics touchpad.
";
};
minSpeed = mkOption {
default = "0.06";
};
maxSpeed = mkOption {
default = "0.12";
};
};
layout = mkOption {

View File

@ -49,7 +49,7 @@ let
++ optional (videoDriver == "intel") xorg.xf86videointel
++ optional (videoDriver == "nv") xorg.xf86videonv
++ optional (videoDriver == "ati") xorg.xf86videoati
++ (optional cfg.isSynaptics ["${pkgs.synaptics}/${xorg.xorgserver}" /*xorg.xf86inputevdev*/]);
++ (optional cfg.synaptics.enable ["${pkgs.synaptics}/${xorg.xorgserver}" /*xorg.xf86inputevdev*/]);
configFile = stdenv.mkDerivation {
@ -58,11 +58,11 @@ let
inherit fontDirectories videoDriver resolutions;
isClone = if cfg.isClone then "on" else "off";
synapticsInputDevice = if cfg.isSynaptics then ''
synapticsInputDevice = if cfg.synaptics.enable then ''
Section "InputDevice"
Identifier "Touchpad[0]"
Driver "synaptics"
Option "Device" "${cfg.devSynaptics}"
Option "Device" "${cfg.synaptics.dev}"
Option "Protocol" "PS/2"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
@ -73,8 +73,8 @@ let
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.06"
Option "MaxSpeed" "0.12"
Option "MinSpeed" "${cfg.synaptics.minSpeed}"
Option "MaxSpeed" "${cfg.synaptics.maxSpeed}"
Option "AccelFactor" "0.0010"
Option "SHMConfig" "on"
Option "Repeater" "/dev/input/mice"
@ -91,7 +91,7 @@ let
xkbModel = cfg.xkbModel;
layout = cfg.layout;
corePointer = if cfg.isSynaptics then "Touchpad[0]" else "Mouse[0]";
corePointer = if cfg.synaptics.enable then "Touchpad[0]" else "Mouse[0]";
internalAGPGART =
if cfg.useInternalAGPGART == "yes" then