I am test-driving nixos on my machine and I try to deploy sway with gdm and but without gnome.
I applied the info of the wiki page (Sway - NixOS Wiki) but it does not talk about the integration with gdm.
When I activate gdm and sway, the sway.desktop file defining the sway wayland session is not seen by gdm. I tried the following:
When I do this, gdm does not start as it does not find any session files.
For gnome I found that adding gnome.gnome-session.sessions to the sessionPackages gnome is correctly seen so I think it is related content of the sway package. The sway.desktop file is in the nix store.
Sway has it’s own configuration options which add itself to displayManager.sessionPackages automatically. Try setting programs.sway.enable. You can see it uses a custom version of sway here:
Unfortunately programs.sway.enable was already at true and still it didn’t work.
I put a stripped down version of my flake configuration to demonstrate the issue:
Maybe there is something wrong when I manipulate the imports. I run nixos-rebuild switch --flake. #salm to apply the configuration.
This shouldn’t be the case. I made a package for Vivarium and with just that session file I was able to add a desktop entry to GDM. Only other session I have is XMonad (no Gnome at all). I have an old profile for Sway, I don’t use it anymore but I’ll build it and see if I can get it to show up in GDM later on. It used to work fine
How can I check the path used by gdm in nixos to retrieve the session installed ? I don’t know how to get the actual wayland-sessions directory it reads.
Strange, I tried it and my old sway profile still works fine with GDM. Only other sessions I’ve got in there are the aforementioned Vivarium and Xmonad.
I tried a fresh start and I confirm the behavior. After installing using the livecd, disabling gnome and enabling only sway makes gdm not starting. If I keep gnome it is ok.
Tried lightdm but it has scaling issues on hidpi and does not start sway on the first login.