Wayland sessions

How do I configure a wayland session for Sway or Enlightenment?
I noticed the Oct 2018 message, but hoped it wasn’t still in unstable anymore?
I’m very very new to nixos, but the idea is great and I want to play with it more.
Thanks
Danny

The last time I checked, sway doesn’t integrate with GDM or other session managers.

What I do is log into the console and then run exec sway.

I can try that :wink: I’ve used sway with sddm on other distros. Before I reboot back in Nixos, I’ll validate that (and make sure my mind isn’t playing tricks on me).

According to the Arch Wiki it’s possible to make it work with GDM3 and SDDM. It’s mainly an issue of aligning all of the bits together.

The main issue is that the nixos module for the display managers is tied to the xserver, it hasn’t really been designed with wayland in mind. I don’t know all of the details so you would have to dig in there. The nixpkgs sway package has a share/wayland-sessions/sway.desktop, the issue is to patch the GDM3 / SDDM config for it to look in the right place.

That’s kinda of what I thought looking around. It might pay for it to move in that direction, as Wayland is probably the next big thing with Gnome and KDE moving more and more in that direction.
My opinion right now, is Wayland is not production ready…but getting there pretty quickly.

GDM supports launching wayland sessions and SDDM too (though I haven’t tested that in a while). Adding sway to services.xserver.displayManager.extraSessionFilePackages should probably work out of the box (that makes GDM et.al. aware of relevant .desktop session files in the package). This how we do it in gnome.

There’s a PR for pasma https://github.com/NixOS/nixpkgs/pull/56988#, which is blocked on getting SDDM to select a known default session when building the system (GDM never supported that). I’ve made an attempt to fix the default session issue here: https://github.com/NixOS/nixpkgs/pull/53843

In short as @zimbatm said, there’s a bunch of assumptions built into the whole desktop/display manager system which we don’t want to just break.

Oh, I’m not saying just because I want it. Just that I think it will increase in importance soon. Of course that will probably require some upstream changes too.
I’m well capable of adjusting things in config files by hand. I only opened topic to know if there was a Nix was of doing it yet :slight_smile: