[Solved] Zsh configuration with Gnome

I’m playing around with NixOS and am loving it so far. One issue I’m having that I have been unable to figure out is the following. If I make zsh the default shell for a user, two oddities arise. First, on the GDM login screen, the user is no longer displayed as an option and the username must be entered prior to the password. Second, upon logging in, NixOS mounted partitions (EFI, root and home) now show up on the dash-to-dock panel. With bash, neither of these issues happen. I assume that there is some configuration issue here.

Help/ideas? Thanks in advance!

Are you sure there wasn’t some other change that took place between switching user shells to zsh? I don’t see how that could be related to these issues directly all by itself. Maybe your system channel was updated, for example?

I haven’t made any changes to the system channel (I haven’t even gotten as far as knowing how to do so). It is a new install and everything works as expected when the user shell is bash but as described above when the user shell is zsh.

How exactly do you make zsh a users default? And have you also enabled zsh as a shell in general?

In the section where I define the user, I add a line shell = pkgs.zsh;.

You also need to programs.zsh.enable or something like that, to make zsh a valid system shell.

1 Like

Thank you, that worked although I don’t understand why – I’m happy for the system shell to continue being bash.

programs.zsh.enable adds a line to /etc/shells that allows for zsh being used as a user’s shell.

If a user’s shell isn’t in that file most DM will not present that user a “quick login”, as such users are considered “system users”.

Ah – thank you for the explanation!