Enable Plasma 6

Is there a basic working plasma 6 config I can use as a starting place? I’ve tried doing a fresh NixOS 24.05 Plasma6 installation, but failed: Plasma6 sddm login hangs

I got it booting & managed to login, but the panel is empty, I get crash log windows on most stuff I try to start and the system is utterly useless.

I was hoping to get something close to the installer iso which is working fine on my machine, but allas this doesn’t seem to be as easy as hoped.

I had a basic working NixOS 24.05 system running with the default Gnome desktop, but was keen to try KDE Plasma and Wayland. Sadly the result was just a tty-only login with no windowing system.

I tried to follow the steps above, however as I had not been running KDE5 beforehand some of them did not seem to be relevant.

So anyhow I-

  • switched to the nixos-unstable channel
  • did a nix-channel --update
  • Made the following changes to configuration.nix. Note I disabled everything relating to X on the basis of switching to a “pure” Wayland setup (but that may have been an error)
  • Ran nixos-rebuild switch and rebooted
# KDE Plasma 6
services.desktopManager.plasma6.enable = true;
services.displayManager.sddm.wayland.enable = true;

/*   # Disable all the X11 + Gnome stuff
  services.xserver.enable = true;

  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;
  # Stop gdm suspending the machine if nobody is logged in to the console
  services.xserver.displayManager.gdm.autoSuspend = false;

  # Configure keymap in X11
  services.xserver.xkb = {
    layout = "gb";
    variant = "";
  }; */

Lots of download and rebuilding activity ran, but the end result was just a TTY login with no windowing system in sight.

I have no experience with Wayland, so no idea how to try to start the windowing system manually from the console (i.e. the equivalent of xstart) so my only option was to revert to an earlier generation.

Have I done something obviously silly?, and is there anything I can debug to see what’s gone wrong?

The answer in another thread Missing sddm.conf with KDE Plasma 6 and wayland helped me get Plasma 6 running

The recipe in the inital post seems to be missing a 3rd critical line. The example that works (just to get running) for me is:

# KDE Plasma 6
services.desktopManager.plasma6.enable = true;
# Enable SDDM, then enable Wayland support within SDDM(?)
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true; # required if no login diplay manager

/*   # Disable X11 + Gnome.
  services.xserver.enable = true;

  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;
  # Stop gdm suspending the machine if nobody is logged in to the console
  services.xserver.displayManager.gdm.autoSuspend = false;

  # Configure keymap in X11
  services.xserver.xkb = {
    layout = "gb";
    variant = "";
  }; */

However the keymap is wrong in Plasma, as it’s defaulting to the US keyboard layout. I assume services.xserver.xkb is not the way to configure wayland, so there’s still some config options to track down.

I read somewhere on a KDE (non-NixOS) forum that SDDM respected the system settings in /etc/default/locale. However I set the system locale to en_GB.UTF-8 during installation, but that’s not being picked up by SDDM in this setup.

Update- I couldn’t find a way to configure the keymap/locale for Plasma6 declaratively.

However if you use the KDE System Settings/Keyboard/Layouts option and create a single new layout (English(UK) in my case) this seems to be taken as the system default layout, solving the problem.