2007-03-06 00:07:00 +00:00
|
|
|
{ stdenv, writeText, lib, xorg, mesa, xterm, slim, gnome
|
|
|
|
, compiz, feh
|
2007-03-28 22:16:35 +01:00
|
|
|
, kdelibs, kdebase
|
2007-03-30 13:33:42 +01:00
|
|
|
, xkeyboard_config
|
2007-04-02 16:01:09 +01:00
|
|
|
, openssh, x11_ssh_askpass
|
2007-05-28 16:39:25 +01:00
|
|
|
, nvidiaDrivers, libX11, libXext
|
2007-09-24 10:02:43 +01:00
|
|
|
, synaptics
|
2006-11-28 22:27:56 +00:00
|
|
|
|
2007-02-26 23:11:32 +00:00
|
|
|
, config
|
|
|
|
|
2006-11-28 22:27:56 +00:00
|
|
|
, # Virtual console for the X server.
|
|
|
|
tty ? 7
|
|
|
|
|
|
|
|
, # X display number.
|
|
|
|
display ? 0
|
|
|
|
|
2007-02-25 15:53:57 +00:00
|
|
|
, # List of font directories.
|
|
|
|
fontDirectories
|
|
|
|
|
2007-09-24 06:16:15 +01:00
|
|
|
, # Is Clone mode on?
|
|
|
|
isClone ? "on"
|
2007-12-31 08:55:40 +00:00
|
|
|
|
|
|
|
, # Do we want it to run or just to prepare everything?
|
|
|
|
autorun ? true
|
|
|
|
|
|
|
|
, # Create unneeded links in /etc?
|
|
|
|
exportConfiguration ? false
|
2006-11-28 22:27:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2007-11-09 18:49:45 +00:00
|
|
|
cfg = config.services.xserver;
|
2007-02-26 23:11:32 +00:00
|
|
|
|
|
|
|
optional = condition: x: if condition then [x] else [];
|
|
|
|
|
2007-03-06 00:07:00 +00:00
|
|
|
# Get a bunch of user settings.
|
2007-11-09 18:49:45 +00:00
|
|
|
videoDriver = cfg.videoDriver;
|
2008-01-04 10:28:12 +00:00
|
|
|
resolutions = map (res: ''"${toString res.x}x${toString res.y}"'') (cfg.resolutions);
|
2007-11-09 18:49:45 +00:00
|
|
|
sessionType = cfg.sessionType;
|
|
|
|
sessionStarter = cfg.sessionStarter;
|
|
|
|
renderingFlag = cfg.renderingFlag;
|
2007-03-06 00:07:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
sessionCmd =
|
|
|
|
if sessionType == "" then sessionStarter else
|
|
|
|
if sessionType == "xterm" then "${xterm}/bin/xterm -ls" else
|
2007-05-28 15:09:04 +01:00
|
|
|
if sessionType == "gnome" then "${gnome.gnometerminal}/bin/gnome-terminal -ls" else
|
2007-03-06 00:07:00 +00:00
|
|
|
abort ("unknown session type "+ sessionType);
|
2007-02-28 23:00:09 +00:00
|
|
|
|
2007-02-26 23:11:32 +00:00
|
|
|
|
2007-03-28 22:16:35 +01:00
|
|
|
windowManager =
|
2007-11-09 18:49:45 +00:00
|
|
|
let wm = cfg.windowManager; in
|
2007-03-28 22:16:35 +01:00
|
|
|
if wm != "" then wm else
|
|
|
|
if sessionType == "gnome" then "metacity" else
|
|
|
|
if sessionType == "kde" then "none" /* started by startkde */ else
|
|
|
|
"twm";
|
|
|
|
|
|
|
|
|
2007-05-28 15:09:04 +01:00
|
|
|
modules =
|
2007-05-29 20:53:03 +01:00
|
|
|
optional (videoDriver == "nvidia") nvidiaDrivers ++ #make sure it first loads the nvidia libs
|
|
|
|
[
|
|
|
|
xorg.xorgserver
|
|
|
|
xorg.xf86inputkeyboard
|
|
|
|
xorg.xf86inputmouse
|
|
|
|
]
|
|
|
|
++ optional (videoDriver == "vesa") xorg.xf86videovesa
|
2007-10-26 05:28:01 +01:00
|
|
|
++ optional (videoDriver == "vga") xorg.xf86videovga
|
2007-06-28 10:57:36 +01:00
|
|
|
++ optional (videoDriver == "sis") xorg.xf86videosis
|
2007-05-29 20:53:03 +01:00
|
|
|
++ optional (videoDriver == "i810") xorg.xf86videoi810
|
2007-09-24 10:02:43 +01:00
|
|
|
++ optional (videoDriver == "intel") xorg.xf86videointel
|
2007-11-15 23:57:20 +00:00
|
|
|
++ optional (videoDriver == "nv") xorg.xf86videonv
|
2007-12-18 22:43:17 +00:00
|
|
|
++ optional (videoDriver == "ati") xorg.xf86videoati
|
2007-11-09 18:49:45 +00:00
|
|
|
++ (optional (cfg.isSynaptics) [(synaptics+"/"+xorg.xorgserver) /*xorg.xf86inputevdev*/]);
|
2008-01-04 10:28:12 +00:00
|
|
|
|
|
|
|
|
2007-02-26 23:11:32 +00:00
|
|
|
configFile = stdenv.mkDerivation {
|
2006-11-28 22:27:56 +00:00
|
|
|
name = "xserver.conf";
|
|
|
|
src = ./xserver.conf;
|
2007-11-06 00:00:29 +00:00
|
|
|
inherit fontDirectories videoDriver resolutions isClone;
|
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
synapticsInputDevice = if cfg.isSynaptics then ''
|
|
|
|
Section "InputDevice"
|
|
|
|
Identifier "Touchpad[0]"
|
|
|
|
Driver "synaptics"
|
|
|
|
Option "Device" "${cfg.devSynaptics}"
|
|
|
|
Option "Protocol" "PS/2"
|
|
|
|
Option "LeftEdge" "1700"
|
|
|
|
Option "RightEdge" "5300"
|
|
|
|
Option "TopEdge" "1700"
|
|
|
|
Option "BottomEdge" "4200"
|
|
|
|
Option "FingerLow" "25"
|
|
|
|
Option "FingerHigh" "30"
|
|
|
|
Option "MaxTapTime" "180"
|
|
|
|
Option "MaxTapMove" "220"
|
|
|
|
Option "VertScrollDelta" "100"
|
|
|
|
Option "MinSpeed" "0.06"
|
|
|
|
Option "MaxSpeed" "0.12"
|
|
|
|
Option "AccelFactor" "0.0010"
|
|
|
|
Option "SHMConfig" "on"
|
|
|
|
Option "Repeater" "/dev/input/mice"
|
|
|
|
Option "TapButton1" "1"
|
|
|
|
Option "TapButton2" "2"
|
|
|
|
Option "TapButton3" "3"
|
|
|
|
EndSection
|
|
|
|
'' else "";
|
|
|
|
|
|
|
|
xkbOptions = if cfg.xkbOptions == "" then "" else ''
|
|
|
|
Option "XkbOptions" "${cfg.xkbOptions}"
|
|
|
|
'';
|
2007-11-06 00:00:29 +00:00
|
|
|
|
2007-11-09 18:49:45 +00:00
|
|
|
layout = cfg.layout;
|
2007-11-06 00:00:29 +00:00
|
|
|
|
2007-11-09 18:49:45 +00:00
|
|
|
corePointer = if cfg.isSynaptics then "Touchpad[0]" else "Mouse[0]";
|
2007-11-06 00:00:29 +00:00
|
|
|
|
|
|
|
internalAGPGART =
|
2008-01-04 10:28:12 +00:00
|
|
|
if cfg.useInternalAGPGART == "yes" then
|
|
|
|
'' Option "UseInternalAGPGART" "yes"''
|
|
|
|
else if cfg.useInternalAGPGART == "no" then
|
|
|
|
'' Option "UseInternalAGPGART" "no"''
|
|
|
|
else "";
|
2007-11-06 00:00:29 +00:00
|
|
|
|
2007-11-09 18:49:45 +00:00
|
|
|
extraDeviceConfig = cfg.extraDeviceConfig;
|
|
|
|
extraMonitorSettings = cfg.extraMonitorSettings;
|
2008-01-02 21:16:58 +00:00
|
|
|
extraDisplaySettings = cfg.extraDisplaySettings;
|
2007-11-09 18:49:45 +00:00
|
|
|
extraModules = cfg.extraModules;
|
|
|
|
serverLayoutOptions = cfg.serverLayoutOptions;
|
|
|
|
defaultDepth = cfg.defaultDepth;
|
2007-09-24 10:02:43 +01:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
xfs = if cfg.useXFS == false then "" else
|
|
|
|
''FontPath "${toString cfg.useXFS}"'';
|
2007-12-25 12:16:38 +00:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
buildCommand = ''
|
2007-02-25 15:53:57 +00:00
|
|
|
buildCommand= # urgh, don't substitute this
|
2007-02-26 21:39:07 +00:00
|
|
|
|
2007-02-25 15:53:57 +00:00
|
|
|
export fontPaths=
|
|
|
|
for i in $fontDirectories; do
|
2008-01-04 10:28:12 +00:00
|
|
|
if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then
|
2007-02-25 15:53:57 +00:00
|
|
|
for j in $(find $i -name fonts.dir); do
|
2008-01-04 10:28:12 +00:00
|
|
|
fontPaths="''${fontPaths}FontPath \"$(dirname $j)\"''\n"
|
2007-02-25 15:53:57 +00:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
done
|
2007-02-26 21:39:07 +00:00
|
|
|
|
|
|
|
export modulePaths=
|
2007-02-26 23:11:32 +00:00
|
|
|
for i in $(find ${toString modules} -type d); do
|
2007-02-26 21:39:07 +00:00
|
|
|
if ls $i/*.so 2> /dev/null; then
|
2008-01-04 10:28:12 +00:00
|
|
|
modulePaths="''${modulePaths}ModulePath \"$i\"''\n"
|
2007-02-26 21:39:07 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2007-05-28 15:09:04 +01:00
|
|
|
#if only my gf were this dirty
|
2008-01-04 10:28:12 +00:00
|
|
|
if test "${toString videoDriver}" == "nvidia"; then
|
2007-10-03 15:48:41 +01:00
|
|
|
export moduleSection='
|
2008-01-04 10:28:12 +00:00
|
|
|
Load "glx"
|
|
|
|
SubSection "extmod"
|
|
|
|
Option "omit xfree86-dga"
|
2007-10-03 15:48:41 +01:00
|
|
|
EndSubSection
|
|
|
|
'
|
|
|
|
|
|
|
|
export screen='
|
2008-01-04 10:28:12 +00:00
|
|
|
Option "AddARGBGLXVisuals" "true"
|
|
|
|
Option "DisableGLXRootClipping" "true"
|
2007-10-03 15:48:41 +01:00
|
|
|
'
|
|
|
|
|
|
|
|
export device='
|
2008-01-04 10:28:12 +00:00
|
|
|
Option "RenderAccel" "true"
|
|
|
|
Option "AllowGLXWithComposite" "true"
|
|
|
|
Option "AddARGBGLXVisuals" "true"
|
2007-10-03 15:48:41 +01:00
|
|
|
'
|
|
|
|
|
|
|
|
export extensions='
|
2008-01-04 10:28:12 +00:00
|
|
|
Option "Composite" "Enable"
|
2007-10-03 15:48:41 +01:00
|
|
|
'
|
2007-05-28 15:09:04 +01:00
|
|
|
|
2007-05-29 20:53:03 +01:00
|
|
|
else
|
2007-10-03 15:48:41 +01:00
|
|
|
export moduleSection='
|
2008-01-04 10:28:12 +00:00
|
|
|
Load "glx"
|
|
|
|
Load "dri"
|
2007-10-03 15:48:41 +01:00
|
|
|
'
|
2007-05-29 20:53:03 +01:00
|
|
|
export screen=
|
|
|
|
export device=
|
|
|
|
export extensions=
|
2007-05-28 15:09:04 +01:00
|
|
|
fi
|
2007-10-27 18:47:54 +01:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
if [ "${toString videoDriver}" = i810 ]; then
|
|
|
|
export extensions='
|
|
|
|
Option "Composite" "Enable"
|
|
|
|
';
|
|
|
|
fi;
|
2007-05-28 15:09:04 +01:00
|
|
|
|
2007-02-25 15:53:57 +00:00
|
|
|
substituteAll $src $out
|
2008-01-04 10:28:12 +00:00
|
|
|
'';
|
2006-11-28 22:27:56 +00:00
|
|
|
};
|
|
|
|
|
2007-02-26 23:11:32 +00:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
clientScript = writeText "xclient" ''
|
2007-03-06 00:07:00 +00:00
|
|
|
|
2007-03-28 22:16:35 +01:00
|
|
|
source /etc/profile
|
|
|
|
|
2007-03-06 00:07:00 +00:00
|
|
|
exec > $HOME/.Xerrors 2>&1
|
2007-03-30 13:33:42 +01:00
|
|
|
|
|
|
|
|
2007-04-02 16:01:09 +01:00
|
|
|
### Load X defaults.
|
2007-03-30 13:33:42 +01:00
|
|
|
if test -e ~/.Xdefaults; then
|
|
|
|
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
|
|
|
|
fi
|
2007-04-02 16:01:09 +01:00
|
|
|
|
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
${if cfg.startSSHAgent then ''
|
2007-04-02 16:01:09 +01:00
|
|
|
### Start the SSH agent.
|
|
|
|
export SSH_ASKPASS=${x11_ssh_askpass}/libexec/x11-ssh-askpass
|
|
|
|
eval $(${openssh}/bin/ssh-agent)
|
2008-01-04 10:28:12 +00:00
|
|
|
'' else ""}
|
2007-09-01 18:57:04 +01:00
|
|
|
|
|
|
|
### Allow user to override system-wide configuration
|
|
|
|
if test -f ~/.xsession; then
|
|
|
|
source ~/.xsession;
|
|
|
|
fi
|
2007-03-06 00:07:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
### Start a window manager.
|
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
${if windowManager == "twm" then ''
|
2007-03-28 22:16:35 +01:00
|
|
|
${xorg.twm}/bin/twm &
|
2008-01-04 10:28:12 +00:00
|
|
|
''
|
2007-03-01 00:00:16 +00:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
else if windowManager == "metacity" then ''
|
2007-05-28 15:09:04 +01:00
|
|
|
env LD_LIBRARY_PATH=${libX11}/lib:${libXext}/lib:/usr/lib/
|
2007-03-28 22:16:35 +01:00
|
|
|
# !!! Hack: load the schemas for Metacity.
|
2008-01-04 10:28:12 +00:00
|
|
|
GCONF_CONFIG_SOURCE=xml::~/.gconf ${gnome.GConf}/bin/gconftool-2 \
|
2007-03-28 22:16:35 +01:00
|
|
|
--makefile-install-rule ${gnome.metacity}/etc/gconf/schemas/*.schemas
|
|
|
|
${gnome.metacity}/bin/metacity &
|
2008-01-04 10:28:12 +00:00
|
|
|
''
|
2007-03-28 22:16:35 +01:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
else if windowManager == "kwm" then ''
|
2007-03-28 22:16:35 +01:00
|
|
|
${kdebase}/bin/kwin &
|
2008-01-04 10:28:12 +00:00
|
|
|
''
|
2007-03-01 00:00:16 +00:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
else if windowManager == "compiz" then ''
|
2007-03-28 22:16:35 +01:00
|
|
|
# !!! Hack: load the schemas for Compiz.
|
2008-01-04 10:28:12 +00:00
|
|
|
GCONF_CONFIG_SOURCE=xml::~/.gconf ${gnome.GConf}/bin/gconftool-2 \
|
2007-03-28 22:16:35 +01:00
|
|
|
--makefile-install-rule ${compiz}/etc/gconf/schemas/*.schemas
|
|
|
|
|
|
|
|
# !!! Hack: turn on most Compiz modules.
|
2008-01-04 10:28:12 +00:00
|
|
|
${gnome.GConf}/bin/gconftool-2 -t list --list-type=string \
|
|
|
|
--set /apps/compiz/general/allscreens/options/active_plugins \
|
2007-03-28 22:16:35 +01:00
|
|
|
[gconf,png,decoration,wobbly,fade,minimize,move,resize,cube,switcher,rotate,place,scale,water]
|
|
|
|
|
|
|
|
# Start Compiz and the GTK-style window decorator.
|
2007-05-28 15:09:04 +01:00
|
|
|
env LD_LIBRARY_PATH=${libX11}/lib:${libXext}/lib:/usr/lib/
|
2007-11-05 08:33:12 +00:00
|
|
|
${compiz}/bin/compiz gconf ${renderingFlag}&
|
2007-05-28 15:09:04 +01:00
|
|
|
${compiz}/bin/gtk-window-decorator --sync &
|
2008-01-04 10:28:12 +00:00
|
|
|
''
|
|
|
|
|
|
|
|
else if windowManager == "none" then ''
|
2007-03-28 22:16:35 +01:00
|
|
|
# The session starter will start the window manager.
|
2008-01-04 10:28:12 +00:00
|
|
|
''
|
2007-03-01 00:00:16 +00:00
|
|
|
|
2007-03-28 22:16:35 +01:00
|
|
|
else abort ("unknown window manager " + windowManager)}
|
2007-03-06 00:07:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
### Show a background image.
|
2007-03-28 22:16:35 +01:00
|
|
|
# (but not if we're starting a full desktop environment that does it for us)
|
2008-01-04 10:28:12 +00:00
|
|
|
${if sessionType != "kde" then ''
|
2007-03-01 00:00:16 +00:00
|
|
|
|
2007-03-28 22:16:35 +01:00
|
|
|
if test -e $HOME/.background-image; then
|
|
|
|
${feh}/bin/feh --bg-scale $HOME/.background-image
|
|
|
|
fi
|
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
'' else ""}
|
2007-03-28 22:16:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
### Start the session.
|
2008-01-04 10:28:12 +00:00
|
|
|
${if sessionType == "kde" then ''
|
2007-03-28 22:16:35 +01:00
|
|
|
|
|
|
|
# Start KDE.
|
2007-08-09 20:59:48 +01:00
|
|
|
export KDEDIRS=$HOME/.nix-profile:/nix/var/nix/profiles/default:${kdebase}:${kdelibs}
|
2007-03-28 22:16:35 +01:00
|
|
|
export XDG_CONFIG_DIRS=${kdebase}/etc/xdg:${kdelibs}/etc/xdg
|
|
|
|
export XDG_DATA_DIRS=${kdebase}/share
|
|
|
|
exec ${kdebase}/bin/startkde
|
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
'' else ''
|
2007-03-06 00:07:00 +00:00
|
|
|
|
2007-03-28 22:16:35 +01:00
|
|
|
# For all other session types, we currently just start a
|
|
|
|
# terminal of the kind indicated by sessionCmd.
|
|
|
|
# !!! yes, this means that you 'log out' by killing the X server.
|
|
|
|
while ${sessionCmd}; do
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
''}
|
2007-03-28 22:16:35 +01:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
'';
|
2007-02-25 16:20:14 +00:00
|
|
|
|
2007-02-26 23:11:32 +00:00
|
|
|
|
2007-02-25 22:27:17 +00:00
|
|
|
xserverArgs = [
|
|
|
|
"-ac"
|
2007-05-28 15:09:04 +01:00
|
|
|
"-logverbose"
|
|
|
|
"-verbose"
|
2007-02-25 22:27:17 +00:00
|
|
|
"-terminate"
|
|
|
|
"-logfile" "/var/log/X.${toString display}.log"
|
2007-02-26 23:11:32 +00:00
|
|
|
"-config ${configFile}"
|
2007-02-25 22:27:17 +00:00
|
|
|
":${toString display}" "vt${toString tty}"
|
2007-03-30 13:33:42 +01:00
|
|
|
"-xkbdir" "${xkeyboard_config}/etc/X11/xkb"
|
2008-01-04 10:28:12 +00:00
|
|
|
] ++ optional (!config.services.xserver.tcpEnable) "-nolisten tcp";
|
2007-02-25 22:27:17 +00:00
|
|
|
|
2007-03-06 00:07:00 +00:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
slimConfig = writeText "slim.cfg" ''
|
|
|
|
xauth_path ${xorg.xauth}/bin/xauth
|
|
|
|
default_xserver ${xorg.xorgserver}/bin/X
|
|
|
|
xserver_arguments ${toString xserverArgs}
|
|
|
|
login_cmd exec ${stdenv.bash}/bin/sh ${clientScript}
|
|
|
|
'';
|
2007-02-25 22:27:17 +00:00
|
|
|
|
2007-02-26 23:11:32 +00:00
|
|
|
|
2007-06-05 12:51:59 +01:00
|
|
|
# Unpack the SLiM theme, or use the default.
|
|
|
|
slimThemesDir =
|
|
|
|
let
|
|
|
|
unpackedTheme = stdenv.mkDerivation {
|
|
|
|
name = "slim-theme";
|
2008-01-04 10:28:12 +00:00
|
|
|
buildCommand = ''
|
2007-06-05 12:51:59 +01:00
|
|
|
ensureDir $out
|
|
|
|
cd $out
|
2007-11-09 18:49:45 +00:00
|
|
|
unpackFile ${cfg.slim.theme}
|
2007-06-05 12:51:59 +01:00
|
|
|
ln -s * default
|
2008-01-04 10:28:12 +00:00
|
|
|
'';
|
2007-06-05 12:51:59 +01:00
|
|
|
};
|
2007-11-09 18:49:45 +00:00
|
|
|
in if cfg.slim.theme == null then "${slim}/share/slim/themes" else unpackedTheme;
|
2007-06-05 12:51:59 +01:00
|
|
|
|
|
|
|
|
2006-11-28 22:27:56 +00:00
|
|
|
in
|
|
|
|
|
2007-02-26 23:11:32 +00:00
|
|
|
|
2006-11-28 22:27:56 +00:00
|
|
|
rec {
|
|
|
|
name = "xserver";
|
|
|
|
|
2007-03-06 00:07:00 +00:00
|
|
|
|
|
|
|
extraPath = [
|
|
|
|
xorg.xrandr
|
2007-03-30 13:33:42 +01:00
|
|
|
xorg.xrdb
|
|
|
|
xorg.setxkbmap
|
2007-03-06 00:07:00 +00:00
|
|
|
feh
|
|
|
|
]
|
|
|
|
++ optional (windowManager == "twm") [
|
|
|
|
xorg.twm
|
|
|
|
]
|
|
|
|
++ optional (windowManager == "metacity") [
|
|
|
|
gnome.metacity
|
|
|
|
]
|
|
|
|
++ optional (windowManager == "compiz") [
|
|
|
|
compiz
|
|
|
|
]
|
|
|
|
++ optional (sessionType == "xterm") [
|
|
|
|
xterm
|
|
|
|
]
|
|
|
|
++ optional (sessionType == "gnome") [
|
|
|
|
gnome.gnometerminal
|
|
|
|
gnome.GConf
|
|
|
|
gnome.gconfeditor
|
2007-03-28 22:16:35 +01:00
|
|
|
]
|
|
|
|
++ optional (sessionType == "kde") [
|
|
|
|
kdelibs
|
|
|
|
kdebase
|
|
|
|
xorg.iceauth # absolutely required by dcopserver
|
|
|
|
xorg.xset # used by startkde, non-essential
|
2007-03-06 00:07:00 +00:00
|
|
|
];
|
|
|
|
|
2007-03-30 13:55:09 +01:00
|
|
|
|
|
|
|
extraEtc =
|
|
|
|
optional (sessionType == "kde")
|
|
|
|
{ source = "${xkeyboard_config}/etc/X11/xkb";
|
|
|
|
target = "X11/xkb";
|
2007-12-31 08:55:40 +00:00
|
|
|
}
|
|
|
|
++
|
|
|
|
optional (exportConfiguration)
|
2008-01-04 10:28:12 +00:00
|
|
|
{ source = "${configFile}";
|
|
|
|
target = "X11/xorg.conf";
|
|
|
|
};
|
2007-03-30 13:55:09 +01:00
|
|
|
|
2007-03-06 00:07:00 +00:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
job = ''
|
2007-12-31 08:55:40 +00:00
|
|
|
start on ${if autorun then "network-interfaces" else "never"}
|
2006-11-28 22:27:56 +00:00
|
|
|
|
2007-02-27 00:50:22 +00:00
|
|
|
start script
|
2007-06-05 12:51:59 +01:00
|
|
|
|
2007-06-09 20:46:57 +01:00
|
|
|
rm -f /var/run/opengl-driver
|
2007-05-28 15:09:04 +01:00
|
|
|
${if videoDriver == "nvidia"
|
2007-06-09 20:46:57 +01:00
|
|
|
then "ln -sf ${nvidiaDrivers} /var/run/opengl-driver"
|
2007-11-09 18:49:45 +00:00
|
|
|
else if cfg.driSupport
|
2007-06-09 20:46:57 +01:00
|
|
|
then "ln -sf ${mesa} /var/run/opengl-driver"
|
2007-03-06 00:07:00 +00:00
|
|
|
else ""
|
2007-05-28 15:09:04 +01:00
|
|
|
}
|
2007-06-05 12:51:59 +01:00
|
|
|
|
2008-01-04 10:28:12 +00:00
|
|
|
rm -f /var/log/slim.log
|
2007-06-05 12:51:59 +01:00
|
|
|
|
2007-02-27 00:50:22 +00:00
|
|
|
end script
|
2006-11-28 22:27:56 +00:00
|
|
|
|
2007-02-27 00:50:22 +00:00
|
|
|
env SLIM_CFGFILE=${slimConfig}
|
2007-06-05 12:51:59 +01:00
|
|
|
env SLIM_THEMESDIR=${slimThemesDir}
|
2007-05-28 15:09:04 +01:00
|
|
|
env FONTCONFIG_FILE=/etc/fonts/fonts.conf # !!! cleanup
|
|
|
|
env XKB_BINDIR=${xorg.xkbcomp}/bin # Needed for the Xkb extension.
|
|
|
|
env LD_LIBRARY_PATH=${libX11}/lib:${libXext}/lib:/usr/lib/ # related to xorg-sys-opengl - needed to load libglx for (AI)GLX support (for compiz)
|
2006-11-28 22:27:56 +00:00
|
|
|
|
2007-05-28 15:09:04 +01:00
|
|
|
${if videoDriver == "nvidia"
|
|
|
|
then "env XORG_DRI_DRIVER_PATH=${nvidiaDrivers}/X11R6/lib/modules/drivers/"
|
2007-11-13 16:38:39 +00:00
|
|
|
else if cfg.driSupport
|
2007-03-06 00:07:00 +00:00
|
|
|
then "env XORG_DRI_DRIVER_PATH=${mesa}/lib/modules/dri"
|
|
|
|
else ""
|
2007-05-28 15:09:04 +01:00
|
|
|
}
|
2007-02-25 22:27:17 +00:00
|
|
|
|
2007-02-27 00:50:22 +00:00
|
|
|
exec ${slim}/bin/slim
|
2008-01-04 10:28:12 +00:00
|
|
|
'';
|
2006-11-28 22:27:56 +00:00
|
|
|
|
|
|
|
}
|