diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 6cc30b218f4a..226fee7491c1 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -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) { diff --git a/pkgs/desktops/gnome-3/core/gdm/default.nix b/pkgs/desktops/gnome-3/core/gdm/default.nix index c419df5093e9..691049cf655d 100644 --- a/pkgs/desktops/gnome-3/core/gdm/default.nix +++ b/pkgs/desktops/gnome-3/core/gdm/default.nix @@ -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. diff --git a/pkgs/desktops/gnome-3/core/gdm/sessions_dir.patch b/pkgs/desktops/gnome-3/core/gdm/sessions_dir.patch deleted file mode 100644 index cda0468d3493..000000000000 --- a/pkgs/desktops/gnome-3/core/gdm/sessions_dir.patch +++ /dev/null @@ -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