diff --git a/upstart-jobs/xserver.conf b/upstart-jobs/xserver.conf index b1d3a11e97b..5ac2b12d7c5 100644 --- a/upstart-jobs/xserver.conf +++ b/upstart-jobs/xserver.conf @@ -7,9 +7,9 @@ Section "Files" @modulePaths@ EndSection + Section "ServerFlags" Option "AllowMouseOpenFail" "on" - Option "AllowEmptyInput" "off" EndSection @@ -22,25 +22,9 @@ Section "Module" 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@ + Section "Monitor" Identifier "Monitor[0]" Option "DPMS" @@ -89,8 +73,7 @@ EndSection Section "ServerLayout" Identifier "Layout[all]" - InputDevice "Keyboard[0]" "CoreKeyboard" - InputDevice "@corePointer@" "CorePointer" + @setCorePointer@ Screen "Screen[0]" @serverLayoutOptions@ EndSection diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index 7d1d63160d0..062faa06db3 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -32,8 +32,9 @@ let resolutions = map (res: ''"${toString res.x}x${toString res.y}"'') (cfg.resolutions); sessionType = cfg.sessionType; - videoDriverModules = getAttr [ videoDriver ] (throw "unkown video driver : \"${videoDriver}\"") knownVideoDrivers; + videoDriverModules = getAttr [ videoDriver ] (throw "unknown video driver: `${videoDriver}'") knownVideoDrivers; + sessionCmd = if sessionType == "" then cfg.sessionStarter else if sessionType == "xterm" then "${pkgs.xterm}/bin/xterm -ls" else @@ -51,13 +52,11 @@ let modules = - getAttr ["modulesFirst"] [] videoDriverModules ++ [ xorg.xorgserver - xorg.xf86inputkeyboard - xorg.xf86inputmouse - ] + xorg.xf86inputevdev + ] ++ getAttr ["modules"] [] videoDriverModules ++ (optional cfg.synaptics.enable ["${pkgs.synaptics}/${xorg.xorgserver}" /*xorg.xf86inputevdev*/]); @@ -113,10 +112,10 @@ let Option "XkbOptions" "${cfg.xkbOptions}" ''; - xkbModel = cfg.xkbModel; - layout = cfg.layout; - - corePointer = if cfg.synaptics.enable then "Touchpad[0]" else "Mouse[0]"; + setCorePointer = + if cfg.synaptics.enable then '' + InputDevice "Touchpad[0]" "CorePointer" + '' else ""; internalAGPGART = if cfg.useInternalAGPGART == "yes" then