mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
nixos/gdm: use XDG_DATA_DIRS to find sessions
Gdm now searches for session files in XDG_DATA_DIRS so we no longer need the sessions_dir.patch.
This commit is contained in:
parent
a3d6b0a4b1
commit
2c8565a3ce
@ -116,7 +116,7 @@ in
|
||||
environment = {
|
||||
GDM_X_SERVER_EXTRA_ARGS = toString
|
||||
(filter (arg: arg != "-terminate") cfg.xserverArgs);
|
||||
GDM_SESSIONS_DIR = "${cfg.session.desktops}/share/xsessions";
|
||||
XDG_DATA_DIRS = "${cfg.session.desktops}/share/";
|
||||
# Find the mouse
|
||||
XCURSOR_PATH = "~/.icons:${pkgs.gnome3.adwaita-icon-theme}/share/icons";
|
||||
} // optionalAttrs (xSessionWrapper != null) {
|
||||
|
@ -46,10 +46,6 @@ stdenv.mkDerivation rec {
|
||||
# The following patches implement certain environment variables in GDM which are set by
|
||||
# the gdm configuration module (nixos/modules/services/x11/display-managers/gdm.nix).
|
||||
|
||||
# Look for session definition files in the directory specified by GDM_SESSIONS_DIR.
|
||||
./sessions_dir.patch
|
||||
|
||||
# Allow specifying X server arguments with GDM_X_SERVER_EXTRA_ARGS.
|
||||
./gdm-x-session_extra_args.patch
|
||||
|
||||
# Allow specifying a wrapper for running the session command.
|
||||
|
@ -1,38 +0,0 @@
|
||||
--- a/daemon/gdm-launch-environment.c
|
||||
+++ b/daemon/gdm-launch-environment.c
|
||||
@@ -143,6 +143,7 @@
|
||||
"WINDOWPATH",
|
||||
"XCURSOR_PATH",
|
||||
"XDG_CONFIG_DIRS",
|
||||
+ "GDM_SESSIONS_DIR",
|
||||
NULL
|
||||
};
|
||||
char *system_data_dirs;
|
||||
--- a/daemon/gdm-session.c
|
||||
+++ b/daemon/gdm-session.c
|
||||
@@ -364,6 +364,11 @@
|
||||
g_array_append_val (search_array, dir);
|
||||
}
|
||||
|
||||
+ if (getenv("GDM_SESSIONS_DIR") != NULL) {
|
||||
+ gchar *gdm_sessions_dir = g_getenv("GDM_SESSIONS_DIR");
|
||||
+ g_array_append_val (search_array, gdm_sessions_dir);
|
||||
+ };
|
||||
+
|
||||
g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs));
|
||||
|
||||
#ifdef ENABLE_WAYLAND_SUPPORT
|
||||
--- a/libgdm/gdm-sessions.c
|
||||
+++ b/libgdm/gdm-sessions.c
|
||||
@@ -236,6 +236,11 @@
|
||||
g_array_append_val (xorg_search_array, session_dir);
|
||||
}
|
||||
|
||||
+ if (g_getenv("GDM_SESSIONS_DIR") != NULL) {
|
||||
+ gchar *gdm_sessions_dir = g_getenv("GDM_SESSIONS_DIR");
|
||||
+ g_array_append_val (xorg_search_array, gdm_sessions_dir);
|
||||
+ };
|
||||
+
|
||||
g_array_append_vals (xorg_search_array, xorg_search_dirs, G_N_ELEMENTS (xorg_search_dirs));
|
||||
|
||||
#ifdef ENABLE_WAYLAND_SUPPORT
|
Loading…
Reference in New Issue
Block a user