Describe the bug
Enable GDM and gnome, and set users.users.<user>.shell to pkgs.zsh and on a fresh boot with this configuration, try to log in with the "Gnome" session, not the "Gnome on Xorg" session.
Something goes wrong and the session ends and the user is kicked back to the GDM login screen.
The one thing that sticks out to me that occurs when using zsh but not bash is this error: .gnome-shell-wr[2466]: Could not find cursor. Perhaps set XCURSOR_PATH?. Other than that, there are a lot of logs and a lot of errors and I'm not entirely sure which ones are harmless and which ones aren't.
To Reproduce
users.users.<user>.shell to pkgs.zsh.Expected behavior
A successful login
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Metadata
nixpkgs version is 80b42e630b23052
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: nixpkgs.gnome3.gdm
# a list of nixos modules affected by the problem
module: services.xserver.displayManager.gdm
I'm able to reproduce this by setting the user shell to zsh without turning on programs.zsh.enable.
On wayland gnome-session sources the entire environment via a login shell, but only does this if it can find the shell in /etc/shells, which programs.zsh.enable is responsible for.
GDM or the user's session or something seems to maintain a lot of state if there is not a fresh boot (I'm not totally sure what it is), and it will either succeed due to having succeeded once on the same boot, or fail because it has previously failed on the same boot. I am very unsure what's happening here but the only reliable way I know of to test it is to reboot :/
Somewhat off topic, but yeah, this really isn't ideal, but have become a lot better recently in nixos-unstable, primarily due to #68492 (there's basically been a lot of trouble getting gdm/gnome-session to source a clean environment from a shell). Not sure really sure if this is backportable or not tbh, though nixos-unstable is pretty stable and you get the newest gnome-shell too :).
I'm able to reproduce this by setting the user shell to zsh without turning on programs.zsh.enable.
On wayland gnome-session sources the entire environment via a login shell, but only does this if it can find the shell in /etc/shells, which programs.zsh.enable is responsible for.
Sure enough that fixes it! Thank you so much for such a quick response!
It's kind of weird, but I must have had that issue in my config for about a year or so now, and this is the first symptom I've actually noticed. It makes perfect sense though, I wonder if there have been other issues related to that this whole time...
Somewhat off topic, but yeah, this really isn't ideal, but have become a lot better recently in nixos-unstable, primarily due to #68492 (there's basically been a lot of trouble getting gdm/gnome-session to source a clean environment from a shell). Not sure really sure if this is backportable or not tbh, though nixos-unstable is pretty stable and you get the newest gnome-shell too :).
Actually, I first discovered this issue today moving to stable nixos, in fact this issue (or at least this specific symptom of my configuration error) doesn't seem to manifest in unstable. In any case, the slight statefulness of GDM in-between restarts is not so bad, it was only annoying really when trying to track down tihs issue.
Anyway, thanks for helping me track this down!
We should probably warn users about their shell not being in /etc/shells
Actually, I first discovered this issue today moving to stable nixos, in fact this issue (or at least this specific symptom of my configuration error) doesn't seem to manifest in unstable. In any case, the slight statefulness of GDM in-between restarts is not so bad, it was only annoying really when trying to track down tihs issue.
Yep, the improvements I mentioned in nixos-unstable means we no longer are dependent on getting getting the environment from a shell. So the issue you ran into with 19.09 should indeed not happen on unstable :)