Enable wayland on kde plasma

services.xserver = {
		# Required by SDDM.
		enable = true;
		displayManager.sddm = {
			enable = true;
			wayland.enable = true;
		};
		# Enable Desktop Environment.
		desktopManager.plasma5.enable = true;
		# Configure keymap in X11.
		layout = "fr";
		xkbVariant = "azerty";
	};

although I’m enabling Wayland it doesn’t utilize it by default, how can I change this behavior?

  • I don’t wanna use the start-up method menu, cause it’s not very reproducible

I believe wayland.enable enables running sddm itself with wayland.

It sounds like you are trying to set the default session. Does sddm support that? I don’t see anything like that in sddm’s options. You can set the session for autologin but that doesn’t sound like what you are looking for.

services.xserver.displayManager.defaultSession = "plasmawayland"; # for Plasma 5
services.xserver.displayManager.defaultSession = "plasma";        # for Plasma 6 (this is pointless, as Wayland is already the default)

I think the config got updated somewhere so it is no longer xserver (at least on unstable). Here is my working config for plasma6:

{
  services = {
    desktopManager.plasma6 = {
      enable = true;
      enableQt5Integration = true; #disable for qt6 full version
    };
    displayManager = {
      defaultSession = "plasma";
      sddm = {
        enable = true;
        wayland.enable = true;
      };
    };