* Use evdev instead of the deprecated keyboard/mouse drivers. Note:

evdev gets the keyboard layout / model from HAL (`lshal | grep
  xkb'), but we don't yet have a way to override the default (`us').

svn path=/nixos/trunk/; revision=15345
This commit is contained in:
Eelco Dolstra 2009-04-27 23:19:31 +00:00
parent dca7981111
commit 1723eaec3d
2 changed files with 11 additions and 29 deletions

View File

@ -7,9 +7,9 @@ Section "Files"
@modulePaths@ @modulePaths@
EndSection EndSection
Section "ServerFlags" Section "ServerFlags"
Option "AllowMouseOpenFail" "on" Option "AllowMouseOpenFail" "on"
Option "AllowEmptyInput" "off"
EndSection EndSection
@ -22,25 +22,9 @@ Section "Module"
EndSection EndSection
Section "InputDevice"
Driver "kbd"
Identifier "Keyboard[0]"
Option "Protocol" "Standard"
Option "XkbLayout" "@layout@"
Option "XkbModel" "@xkbModel@"
Option "XkbRules" "xfree86"
@xkbOptions@
EndSection
Section "InputDevice"
Driver "mouse"
Identifier "Mouse[0]"
Option "Device" "/dev/input/mice"
EndSection
@synapticsInputDevice@ @synapticsInputDevice@
Section "Monitor" Section "Monitor"
Identifier "Monitor[0]" Identifier "Monitor[0]"
Option "DPMS" Option "DPMS"
@ -89,8 +73,7 @@ EndSection
Section "ServerLayout" Section "ServerLayout"
Identifier "Layout[all]" Identifier "Layout[all]"
InputDevice "Keyboard[0]" "CoreKeyboard" @setCorePointer@
InputDevice "@corePointer@" "CorePointer"
Screen "Screen[0]" Screen "Screen[0]"
@serverLayoutOptions@ @serverLayoutOptions@
EndSection EndSection

View File

@ -32,7 +32,8 @@ let
resolutions = map (res: ''"${toString res.x}x${toString res.y}"'') (cfg.resolutions); resolutions = map (res: ''"${toString res.x}x${toString res.y}"'') (cfg.resolutions);
sessionType = cfg.sessionType; sessionType = cfg.sessionType;
videoDriverModules = getAttr [ videoDriver ] (throw "unkown video driver : \"${videoDriver}\"") knownVideoDrivers; videoDriverModules = getAttr [ videoDriver ] (throw "unknown video driver: `${videoDriver}'") knownVideoDrivers;
sessionCmd = sessionCmd =
if sessionType == "" then cfg.sessionStarter else if sessionType == "" then cfg.sessionStarter else
@ -51,12 +52,10 @@ let
modules = modules =
getAttr ["modulesFirst"] [] videoDriverModules getAttr ["modulesFirst"] [] videoDriverModules
++ [ ++ [
xorg.xorgserver xorg.xorgserver
xorg.xf86inputkeyboard xorg.xf86inputevdev
xorg.xf86inputmouse
] ]
++ getAttr ["modules"] [] videoDriverModules ++ getAttr ["modules"] [] videoDriverModules
++ (optional cfg.synaptics.enable ["${pkgs.synaptics}/${xorg.xorgserver}" /*xorg.xf86inputevdev*/]); ++ (optional cfg.synaptics.enable ["${pkgs.synaptics}/${xorg.xorgserver}" /*xorg.xf86inputevdev*/]);
@ -113,10 +112,10 @@ let
Option "XkbOptions" "${cfg.xkbOptions}" Option "XkbOptions" "${cfg.xkbOptions}"
''; '';
xkbModel = cfg.xkbModel; setCorePointer =
layout = cfg.layout; if cfg.synaptics.enable then ''
InputDevice "Touchpad[0]" "CorePointer"
corePointer = if cfg.synaptics.enable then "Touchpad[0]" else "Mouse[0]"; '' else "";
internalAGPGART = internalAGPGART =
if cfg.useInternalAGPGART == "yes" then if cfg.useInternalAGPGART == "yes" then