From d04157fb98b7b006956c8c5ab0d70d48cb1fb9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Wed, 11 Dec 2019 04:17:59 +0100 Subject: [PATCH] nixos/gdm: do not force the session Having a default session resulted in GDM not remembering the last used session. So do not force the session until setSessionScript is made aware of the last session used. --- nixos/modules/services/x11/display-managers/gdm.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 29a80aac6e68..095569fa08aa 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -204,9 +204,12 @@ in cat - > /run/gdm/.config/gnome-initial-setup-done <<- EOF yes EOF - '' + optionalString hasDefaultUserSession '' - ${setSessionScript}/bin/set-session ${defaultSessionName} - ''; + '' + # TODO: Make setSessionScript aware of previously used sessions + # + optionalString hasDefaultUserSession '' + # ${setSessionScript}/bin/set-session ${defaultSessionName} + # '' + ; }; # Because sd_login_monitor_new requires /run/systemd/machines