mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 12:44:20 +00:00
* 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/branches/fix-style/; revision=14191
This commit is contained in:
parent
fd08470a26
commit
357ca60ed7
@ -15,7 +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
|
||||
# Nix daemon.
|
||||
@ -41,7 +43,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 +52,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
|
||||
|
||||
|
||||
|
@ -2127,7 +2127,7 @@ in
|
||||
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'.
|
||||
|
@ -64,6 +64,16 @@ let
|
||||
inherit (config.environment) pathsToLink;
|
||||
|
||||
ignoreCollisions = true;
|
||||
|
||||
# TODO: move this to upstart-jobs/xserver/desktopManager/kde4.nix
|
||||
postBuild =
|
||||
if config.services.xserver.desktopManager.kde4.enable 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 "";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -29,9 +29,6 @@ mkIf cfg.enable {
|
||||
name = "kde4";
|
||||
start = ''
|
||||
# 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
|
||||
'';
|
||||
}];
|
||||
@ -54,6 +51,8 @@ mkIf cfg.enable {
|
||||
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
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user