Unable to Launch KDE Plasma on Unstable Channel

I cannot start plasma from either SDDM or from tty with DISPLAY=:0 plasmashell. Both methods ended up with the first error as pulled from journalctl -xe:

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
 Available platform plugins are: wayland-egl, wayland, eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, xcb.

I haven’t run into this issue before until bringing up a new machine with unstable channel recently for jovian. Is there any major recent changes on the unstable channel? Breaking multiple DEs at the same time is kinda weird.

minimal configurations (without flake, on unstable channel)

{ config, pkgs, ... }:

{
  imports = [ ./hardware-configuration.nix ];

  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "nixos";
  networking.networkmanager.enable = true;
  services.xserver.xkb = {
    layout = "us";
    variant = "";
  };

  services = {
    displayManager.sddm = {
      enable = true;
      wayland.enable = true;
    };
    desktopManager.plasma6.enable = true;
    openssh.enable = true;
  };

  users.users.[x] = {
    isNormalUser = true;
    description = "[x]";
    extraGroups = [ "networkmanager" "wheel" ];
  };
  nixpkgs.config.allowUnfree = true;
  environment.systemPackages = with pkgs; [
     wayland
  ];
  system.stateVersion = "24.11";
}

Thanks

Hey! Just had this problem and it took a while to figure out. But as the error message suggest, it seems it doesn’t know which env you’re in. I fixed this by forcing the QT_QPA_PLATFORM env var, which fixed it for me.

environment.variables = {
  QT_QPA_PLAFORM = "wayland";
};

Hope this helps!

EDIT: wording