xsession: make updating DBus environment optional

This commit is contained in:
Christoph Ruegge 2016-04-25 23:37:18 +02:00
parent f270af1acd
commit 769a33bedd
4 changed files with 16 additions and 2 deletions

View File

@ -165,6 +165,8 @@ in {
''; '';
}; };
services.xserver.updateDbusEnvironment = true;
environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules" environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules"
"${gnome3.glib_networking.out}/lib/gio/modules" "${gnome3.glib_networking.out}/lib/gio/modules"
"${gnome3.gvfs}/lib/gio/modules" ]; "${gnome3.gvfs}/lib/gio/modules" ];

View File

@ -42,10 +42,13 @@ in
# Set GTK_DATA_PREFIX so that GTK+ can find the Xfce themes. # Set GTK_DATA_PREFIX so that GTK+ can find the Xfce themes.
export GTK_DATA_PREFIX=${config.system.path} export GTK_DATA_PREFIX=${config.system.path}
exec ${pkgs.stdenv.shell} ${pkgs.xfce.xinitrc} ${pkgs.stdenv.shell} ${pkgs.xfce.xinitrc} &
waitPID=$!
''; '';
}; };
services.xserver.updateDbusEnvironment = true;
environment.systemPackages = environment.systemPackages =
[ pkgs.gtk # To get GTK+'s themes. [ pkgs.gtk # To get GTK+'s themes.
pkgs.hicolor_icon_theme pkgs.hicolor_icon_theme

View File

@ -126,7 +126,7 @@ let
(*) echo "$0: Desktop manager '$desktopManager' not found.";; (*) echo "$0: Desktop manager '$desktopManager' not found.";;
esac esac
${optionalString cfg.startDbusSession '' ${optionalString (cfg.startDbusSession && cfg.updateDbusEnvironment) ''
${pkgs.glib}/bin/gdbus call --session \ ${pkgs.glib}/bin/gdbus call --session \
--dest org.freedesktop.DBus --object-path /org/freedesktop/DBus \ --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus \
--method org.freedesktop.DBus.UpdateActivationEnvironment \ --method org.freedesktop.DBus.UpdateActivationEnvironment \

View File

@ -233,6 +233,15 @@ in
''; '';
}; };
updateDbusEnvironment = mkOption {
type = types.bool;
default = false;
description = ''
Whether to update the DBus activation environment after launching the
desktop manager.
'';
};
layout = mkOption { layout = mkOption {
type = types.str; type = types.str;
default = "us"; default = "us";