From 2107f032ab4befe851cd1035d88db9dd3474689d Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Fri, 28 Mar 2025 21:11:21 +0100 Subject: [PATCH] nixos/startx: remove graphical-session assertions this assertion broke gnome sessions in very hard to debug way: - gdm starts, but on successful login just returns to login screen - journalctl isn't exactly helpful in this condition: - a typical gnome login will involve many warnings and errors, that aren't actually preventing login, but will lead affected users on a merry chase for many hours - the actual indicators in the log arent't even an errors, only info and warning - graphical-session.target: Starting requested but asserts failed. - Assertion failed for Current graphical user session. startx is a power tool for power users, needing a certain level of expertise for the user to even want it, let alone use correctly. However, the expectation is, that the necessary expertise will be contained within the domain of startx and that it not break tools for regular users. This partially reverts commit e1c30820858c767d1c77d0e24472b9424b2103ed. --- nixos/modules/services/x11/display-managers/startx.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/nixos/modules/services/x11/display-managers/startx.nix b/nixos/modules/services/x11/display-managers/startx.nix index 2cc574e1687b..792a0e9b7d7c 100644 --- a/nixos/modules/services/x11/display-managers/startx.nix +++ b/nixos/modules/services/x11/display-managers/startx.nix @@ -102,14 +102,6 @@ in environment.systemPackages = with pkgs; [ xorg.xinit ]; - # Make graphical-session fail if the user environment has not been imported - systemd.user.targets.graphical-session = { - unitConfig.AssertEnvironment = [ - "DISPLAY" - "XDG_SESSION_ID" - ]; - }; - }; }