* Set KDEDIRS, XDG_CONFIG_DIRS and XDG_DATA_DIRS in bashrc. This has
the advantage that KDE applications work when logging in via ssh, and that you don't need to logout to have KDE upgrades take effect. On the downside, since the various KDE packages and shared-mime-info all have their own MIME databases, if we put them in one symlink tree (systemPath), we need to rerun update-mime-database on the symlink tree. Also, systemPath is getting very large. svn path=/nixos/trunk/; revision=14148
This commit is contained in:
parent
049c60e8c0
commit
311ff6c8e7
|
@ -15,6 +15,9 @@ export LANG=@defaultLocale@
|
|||
export EDITOR=nano
|
||||
export INFOPATH=/var/run/current-system/sw/info:/var/run/current-system/sw/share/info
|
||||
export LOCATE_PATH=/var/cache/locatedb
|
||||
export KDEDIRS=/var/run/current-system/sw
|
||||
export XDG_CONFIG_DIRS=/var/run/current-system/sw/etc/xdg
|
||||
export XDG_DATA_DIRS=/var/run/current-system/sw/share
|
||||
|
||||
|
||||
# Set up secure multi-user builds: non-root users build through the
|
||||
|
@ -41,7 +44,7 @@ for i in $NIX_PROFILES; do # !!! reverse
|
|||
export PKG_CONFIG_PATH="$i/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
|
||||
# Automake's `aclocal' bails out if it finds non-existent directories
|
||||
# in its path.
|
||||
# in its path. !!! We should fix aclocal instead.
|
||||
if [ -d "$i/share/aclocal" ]
|
||||
then
|
||||
export ACLOCAL_PATH="$i/share/aclocal:$ACLOCAL_PATH"
|
||||
|
@ -50,6 +53,11 @@ for i in $NIX_PROFILES; do # !!! reverse
|
|||
|
||||
# GStreamer.
|
||||
export GST_PLUGIN_PATH="$i/lib/gstreamer-0.10:$GST_PLUGIN_PATH"
|
||||
|
||||
# KDE/Gnome stuff.
|
||||
export KDEDIRS=$i:$KDEDIRS
|
||||
export XDG_CONFIG_DIRS=$i/etc/xdg:$XDG_CONFIG_DIRS
|
||||
export XDG_DATA_DIRS=$i/share:$XDG_DATA_DIRS
|
||||
done
|
||||
|
||||
|
||||
|
|
|
@ -2959,7 +2959,7 @@ root ALL=(ALL) SETENV: ALL
|
|||
environment = {
|
||||
|
||||
pathsToLink = mkOption {
|
||||
default = ["/bin" "/sbin" "/lib" "/share" "/man" "/info"];
|
||||
default = ["/bin" "/sbin" "/lib" "/share" "/man" "/info" "/etc"];
|
||||
example = ["/"];
|
||||
description = "
|
||||
Lists directories to be symlinked in `/var/run/current-system/sw'.
|
||||
|
|
|
@ -266,6 +266,15 @@ rec {
|
|||
inherit (config.environment) pathsToLink;
|
||||
|
||||
ignoreCollisions = true;
|
||||
|
||||
postBuild =
|
||||
if config.services.xserver.sessionType == "kde4" then
|
||||
# Rebuild the MIME database. Otherwise KDE won't be able to
|
||||
# find many MIME types.
|
||||
''
|
||||
${pkgs.shared_mime_info}/bin/update-mime-database $out/share/mime
|
||||
''
|
||||
else "";
|
||||
};
|
||||
|
||||
|
||||
|
@ -301,10 +310,10 @@ rec {
|
|||
inherit (usersGroups) createUsersGroups usersList groupsList;
|
||||
|
||||
path = [
|
||||
pkgs.coreutils pkgs.gnugrep pkgs.findutils
|
||||
pkgs.glibc # needed for getent
|
||||
pkgs.pwdutils
|
||||
];
|
||||
pkgs.coreutils pkgs.gnugrep pkgs.findutils
|
||||
pkgs.glibc # needed for getent
|
||||
pkgs.pwdutils
|
||||
];
|
||||
|
||||
adjustSetuidOwner = pkgs.lib.concatStrings (map
|
||||
(_entry: let entry = {
|
||||
|
|
|
@ -296,9 +296,6 @@ let
|
|||
'' else if sessionType == "kde4" then ''
|
||||
|
||||
# Start KDE.
|
||||
export KDEDIRS=$HOME/.nix-profile:/nix/var/nix/profiles/default:${pkgs.kde42.kdelibs}:${pkgs.kde42.kdebase}:${pkgs.kde42.kdebase_runtime}:${pkgs.kde42.kdebase_workspace}
|
||||
export XDG_CONFIG_DIRS=${pkgs.kde42.kdelibs}/etc/xdg:${pkgs.kde42.kdebase_runtime}/etc/xdg:${pkgs.kde42.kdebase_workspace}/etc/xdg
|
||||
export XDG_DATA_DIRS=${pkgs.kde42.kdelibs}/share:${pkgs.kde42.kdebase}/share:${pkgs.kde42.kdebase_runtime}/share:${pkgs.kde42.kdebase_workspace}/share:${pkgs.shared_mime_info}/share
|
||||
exec ${pkgs.kde42.kdebase_workspace}/bin/startkde
|
||||
|
||||
'' else ''
|
||||
|
@ -398,6 +395,8 @@ rec {
|
|||
pkgs.kde42.kdebase
|
||||
pkgs.kde42.kdebase_runtime
|
||||
pkgs.kde42.kdebase_workspace
|
||||
pkgs.kde42.kdegames
|
||||
pkgs.shared_mime_info
|
||||
xorg.xset # used by startkde, non-essential
|
||||
]
|
||||
++ optional (videoDriver == "nvidia") [
|
||||
|
|
Loading…
Reference in New Issue