Add Wacom X11 driver support
svn path=/nixos/branches/modular-nixos/; revision=16569
This commit is contained in:
parent
383370f782
commit
c8705704e1
@ -148,6 +148,25 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wacom = {
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable Wacom touchscreen/digitizer";
|
||||||
|
};
|
||||||
|
|
||||||
|
device = mkOption {
|
||||||
|
default = "/dev/ttyS0";
|
||||||
|
description = "Device to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
forceDeviceType = mkOption {
|
||||||
|
default = "ISDV4";
|
||||||
|
example = null;
|
||||||
|
description = "Some models (think touchscreen) require forcing device type";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
layout = mkOption {
|
layout = mkOption {
|
||||||
default = "us";
|
default = "us";
|
||||||
description = "
|
description = "
|
||||||
@ -322,7 +341,9 @@ let
|
|||||||
xorg.xf86inputevdev
|
xorg.xf86inputevdev
|
||||||
]
|
]
|
||||||
++ attrByPath ["modules"] [] videoDriverModules
|
++ attrByPath ["modules"] [] videoDriverModules
|
||||||
++ optional cfg.synaptics.enable xorg.xf86inputsynaptics;
|
++ optional cfg.synaptics.enable xorg.xf86inputsynaptics
|
||||||
|
++ (optional cfg.wacom.enable ["${pkgs.linuxwacom}"])
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
fontsForXServer =
|
fontsForXServer =
|
||||||
@ -396,6 +417,32 @@ let
|
|||||||
EndSection
|
EndSection
|
||||||
'' else "";
|
'' else "";
|
||||||
|
|
||||||
|
wacomInputDevice = if cfg.wacom.enable then ''
|
||||||
|
Section "InputDevice"
|
||||||
|
Driver "wacom"
|
||||||
|
Identifier "Wacom_stylus"
|
||||||
|
Option "Device" "${cfg.wacom.device}"
|
||||||
|
Option "Type" "stylus"
|
||||||
|
${if cfg.wacom.forceDeviceType!=null then ''Option "ForceDevice" "${cfg.wacom.forceDeviceType}"'' else ""}
|
||||||
|
Option "Button2" "3"
|
||||||
|
EndSection
|
||||||
|
Section "InputDevice"
|
||||||
|
Driver "wacom"
|
||||||
|
Identifier "Wacom_eraser"
|
||||||
|
Option "Device" "${cfg.wacom.device}"
|
||||||
|
Option "Type" "eraser"
|
||||||
|
${if cfg.wacom.forceDeviceType!=null then ''Option "ForceDevice" "${cfg.wacom.forceDeviceType}"'' else ""}
|
||||||
|
Option "Button1" "2"
|
||||||
|
EndSection
|
||||||
|
Section "InputDevice"
|
||||||
|
Driver "wacom"
|
||||||
|
Identifier "Wacom_cursor"
|
||||||
|
Option "Device" "${cfg.wacom.device}"
|
||||||
|
Option "Type" "cursor"
|
||||||
|
${if cfg.wacom.forceDeviceType!=null then ''Option "ForceDevice" "${cfg.wacom.forceDeviceType}"'' else ""}
|
||||||
|
EndSection
|
||||||
|
'' else "";
|
||||||
|
|
||||||
xkbOptions = if cfg.xkbOptions == "" then "" else ''
|
xkbOptions = if cfg.xkbOptions == "" then "" else ''
|
||||||
Option "XkbOptions" "${cfg.xkbOptions}"
|
Option "XkbOptions" "${cfg.xkbOptions}"
|
||||||
'';
|
'';
|
||||||
@ -416,7 +463,13 @@ let
|
|||||||
extraMonitorSettings = cfg.extraMonitorSettings;
|
extraMonitorSettings = cfg.extraMonitorSettings;
|
||||||
extraDisplaySettings = cfg.extraDisplaySettings;
|
extraDisplaySettings = cfg.extraDisplaySettings;
|
||||||
extraModules = cfg.extraModules;
|
extraModules = cfg.extraModules;
|
||||||
serverLayoutOptions = cfg.serverLayoutOptions;
|
serverLayoutOptions = cfg.serverLayoutOptions +
|
||||||
|
(if cfg.wacom.enable then ''
|
||||||
|
InputDevice "Wacom_stylus"
|
||||||
|
InputDevice "Wacom_cursor"
|
||||||
|
InputDevice "Wacom_eraser"
|
||||||
|
'' else "")
|
||||||
|
;
|
||||||
defaultDepth = cfg.defaultDepth;
|
defaultDepth = cfg.defaultDepth;
|
||||||
virtualScreen = if cfg.virtualScreen != null then
|
virtualScreen = if cfg.virtualScreen != null then
|
||||||
"Virtual ${toString cfg.virtualScreen.x} ${toString cfg.virtualScreen.y}"
|
"Virtual ${toString cfg.virtualScreen.x} ${toString cfg.virtualScreen.y}"
|
||||||
|
@ -23,6 +23,8 @@ EndSection
|
|||||||
|
|
||||||
@synapticsInputDevice@
|
@synapticsInputDevice@
|
||||||
|
|
||||||
|
@wacomInputDevice@
|
||||||
|
|
||||||
Section "Monitor"
|
Section "Monitor"
|
||||||
Identifier "Monitor[0]"
|
Identifier "Monitor[0]"
|
||||||
Option "DPMS"
|
Option "DPMS"
|
||||||
|
Loading…
Reference in New Issue
Block a user