Add xf86-linux-wacom.

Mostly reverts my previous commit.

svn path=/nixos/trunk/; revision=21099
wip/yesman
Yury G. Kudryashov 14 years ago
parent 37746e4fb3
commit 916fbfa070
  1. 1
      modules/module-list.nix
  2. 88
      modules/services/x11/hardware/wacom.nix
  3. 2
      modules/services/x11/xserver.nix

@ -121,6 +121,7 @@
./services/x11/display-managers/kdm.nix
./services/x11/display-managers/slim.nix
./services/x11/hardware/synaptics.nix
./services/x11/hardware/wacom.nix
./services/x11/window-managers/compiz.nix
./services/x11/window-managers/default.nix
./services/x11/window-managers/icewm.nix

@ -0,0 +1,88 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.xserver.wacom;
in
{
options = {
services.xserver.wacom = {
enable = mkOption {
default = false;
description = "Whether to enable the Wacom touchscreen/digitizer.";
};
device = mkOption {
default = "/dev/ttyS0";
description = "Device to use.";
};
forceDeviceType = mkOption {
default = "ISDV4";
example = null;
description = "Some models (think touchscreen) require the device type to be specified.";
};
};
};
config = mkIf cfg.enable {
services.xserver.modules = [ pkgs.xf86_input_wacom ];
services.udev.packages = [ pkgs.xf86_input_wacom ];
services.xserver.serverLayoutSection =
''
InputDevice "Wacom_stylus"
InputDevice "Wacom_cursor"
InputDevice "Wacom_eraser"
'';
services.xserver.config =
''
Section "InputDevice"
Driver "wacom"
Identifier "Wacom_stylus"
Option "Device" "${cfg.device}"
Option "Type" "stylus"
${optionalString (cfg.forceDeviceType != null) ''
Option "ForceDevice" "${cfg.forceDeviceType}"
''}
Option "Button2" "3"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "Wacom_eraser"
Option "Device" "${cfg.device}"
Option "Type" "eraser"
${optionalString (cfg.forceDeviceType != null) ''
Option "ForceDevice" "${cfg.forceDeviceType}"
''}
Option "Button1" "2"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "Wacom_cursor"
Option "Device" "${cfg.device}"
Option "Type" "cursor"
${optionalString (cfg.forceDeviceType != null) ''
Option "ForceDevice" "${cfg.forceDeviceType}"
''}
EndSection
'';
};
}

@ -155,7 +155,7 @@ in
modules = mkOption {
default = [];
example = [ pkgs.synaptics ];
example = [ pkgs.xf86_input_wacom ];
description = "Packages to be added to the module search path of the X server.";
};

Loading…
Cancel
Save