today I want to start my Laptop with NixOS 22.05 but I can’t login as user.
I am using Xmonad and LightDM as login prompt.
I can login via LightDM as root - no problems but when I want to login as user the screen turns black and jump back to the login screen.
Did anybody have the same problem or know how to solve it?
That sounds odd - might be something about your session being broken. Do you have a .xsession-errors file or something similar in your user’s home directory? Anything from journalctl -t xsession?
Something is very broken there! Looks like xmonad is being executed thinking you’re the root user, and trying to open its config from root’s home, which obviously won’t work for lack of permissions. You’re also missing a bunch of binaries that are probably available in your user profile.
Can you share your configuration? Do you use home manager?
First of all it might be helpful to enable gnome/kde/xfce in the configuration just to be able to log in and easily upload old logs (in my experience, this still works even if xmonad doesn’t). But be aware that enabling them will also enable service you might not want. These services will also run if xmonad is selected to log in.
My config currently looks like this:
I’m also interested in your .xsessionrc file and your .xinput, is xmonad started in one of these files? It might help to temporarily rename these files to see if something in there is breaking it.
Hm, where is compton started then? It looks a bit like you came from some kind of functioning system and just copied the $HOME/ folder over, given the various broken things in the logs (like broken xmobar, compont, the command nn missing…). Or did all of this happen after an upgrade to 22.05?
I would recommend you to try to “disable” all the startup configs and enable them one by one. E.g. start with an empty $HOME folder and configure the services one by one…
Once you’re able to get a plain xmonad (which you can get out of with ctrl+shift+q), then you can try with your xmonad config, etc.
Ok I cleaned the whole system with a new configuration.nix and the default xmonad.hs and I can log in. I will now build new configs and hope everything works fine.
Thanks for that
I’d really recommend looking at home manager for the future. It gives you the reproducibility of NixOS, but for your user config as well. If you use a WM, you probably will like it