Merge pull request #14741 from cruegge/dbus-activation-environment
xsession: Update DBus activation environment
This commit is contained in:
commit
dbe1bb06d9
@ -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" ];
|
||||||
|
@ -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
|
||||||
|
@ -126,6 +126,14 @@ let
|
|||||||
(*) echo "$0: Desktop manager '$desktopManager' not found.";;
|
(*) echo "$0: Desktop manager '$desktopManager' not found.";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
${optionalString (cfg.startDbusSession && cfg.updateDbusEnvironment) ''
|
||||||
|
${pkgs.glib}/bin/gdbus call --session \
|
||||||
|
--dest org.freedesktop.DBus --object-path /org/freedesktop/DBus \
|
||||||
|
--method org.freedesktop.DBus.UpdateActivationEnvironment \
|
||||||
|
"{$(env | ${pkgs.gnused}/bin/sed "s/'/\\\\'/g; s/\([^=]*\)=\(.*\)/'\1':'\2'/" \
|
||||||
|
| ${pkgs.coreutils}/bin/paste -sd,)}"
|
||||||
|
''}
|
||||||
|
|
||||||
test -n "$waitPID" && wait "$waitPID"
|
test -n "$waitPID" && wait "$waitPID"
|
||||||
exit 0
|
exit 0
|
||||||
'';
|
'';
|
||||||
|
@ -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";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user