Enable Plasma 6

We did not try this with Flakes. If you want to post the additional guidelines to upgrade with Flakes, I welcome this and would include it in the original post.

This worked flawlessly. Thanks and Shabbat shalom.

For me this line or respectively now this one:

services.displayManager.sddm.wayland.enable = true;

do not work as intended (at least for me). The /etc/sddm.conf which is existent for the x11 sddm is missing and so no theme is present for wayland sddm at all. Do anybody else have the same problem?

There was some action on unstable since release of plasma 6 to remove the xserver from the module options. There should be some small left overs, but most of the options are migrated to non xserver.
Others might follow after 24.05.

The theme option should now sit on services.displayManager.sddm.theme see NixOS Search

The logic for the sddm module was not changed afaik, it was mostly renaming and moving in the code base.
The PR doing so was nixos/sddm: allow running on wayland without xserver enabled by SuperSandro2000 · Pull Request #291913 · NixOS/nixpkgs · GitHub and this is the change to the module nixos/sddm: allow running on wayland without xserver enabled by SuperSandro2000 · Pull Request #291913 · NixOS/nixpkgs · GitHub

1 Like

As I am pretty new to NixOS although living in the Linux world for more than 20 years, my first impression was to have some left overs, because I changed to KDE 6 unstable from Cinnamon on stable. So I downloaded the ISO installer with KDE and did a fresh installation. Right after that switching to unstable and KDE 6. The result was the same: no /etc/sddm.conf even not in /etc/static linking to /nix/store and therefor a non themed SDDM when using wayland. Switching back to x11 SDDM reenables the good looking one.

But it seems to be not a common problem if this works for you here and I might need to file an issue.

1 Like
╰─ ls -alh /etc/sddm.conf
lrwxrwxrwx 1 root root 21 13. Mai 20:14 /etc/sddm.conf -> /etc/static/sddm.conf

╰─ ls -alh /etc/static/sddm.conf
lrwxrwxrwx 8 root root 53  1. Jan 1970  /etc/static/sddm.conf -> /nix/store/y0sh3xn6scc5pbfrq14c1pq6lrvwpr01-sddm.conf

I can not relate here. Is your config available for the public, then i could take a look (or also others) when having some time.

There are no secrets in my config, but maybe newbie stuff :smiley:

I deploy this configuration.nix through a flake.



    # Edit this configuration file to define what should be installed on
    # your system.  Help is available in the configuration.nix(5) man page
    # and in the NixOS manual (accessible by running ‘nixos-help’).
     
    { config, pkgs, ... }:
     
    {
      imports =
        [ # Include the results of the hardware scan.
          ./hardware-configuration.nix
          ./system/apps/steam.nix
        ];
     
      nix.settings.experimental-features = [ "nix-command" "flakes" ];
     
      # Bootloader
      boot.loader.systemd-boot.enable = true;
      boot.loader.efi.canTouchEfiVariables = true;
     
      networking.hostName = "sn0wbound"; # Define your hostname.
      # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
     
      # Configure network proxy if necessary
      # networking.proxy.default = "http://user:password@proxy:port/";
      # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
     
      # Enable networking
      networking.networkmanager.enable = true;
     
      # Set your time zone.
      time.timeZone = "Europe/Berlin";
     
      # Select internationalisation properties.
      i18n.defaultLocale = "en_US.UTF-8";
     
      i18n.extraLocaleSettings = {
        LC_ADDRESS = "de_DE.UTF-8";
        LC_IDENTIFICATION = "de_DE.UTF-8";
        LC_MEASUREMENT = "de_DE.UTF-8";
        LC_MONETARY = "de_DE.UTF-8";
        LC_NAME = "de_DE.UTF-8";
        LC_NUMERIC = "de_DE.UTF-8";
        LC_PAPER = "de_DE.UTF-8";
        LC_TELEPHONE = "de_DE.UTF-8";
        LC_TIME = "de_DE.UTF-8";
      };
     
      # Enable the X11 windowing system.
      services.xserver.enable = true;
     
      # Enable the Cinnamon Desktop Environment.
      #services.xserver.displayManager.lightdm.enable = true;
      #services.xserver.desktopManager.cinnamon.enable = true;
     
      # Enable KDE Plasma 6
      #services.displayManager.sddm.wayland.enable = true;
      services.displayManager.sddm.enable = true;
      services.desktopManager.plasma6.enable = true;
     
      # Configure keymap in X11
      services.xserver.xkb = {
        layout = "de";
        variant = "";
      };
     
      # Using AMD GPU
      boot.initrd.kernelModules = [ "amdgpu" ];
      services.xserver.videoDrivers = [ "amdgpu" ];
      hardware.opengl.driSupport = true; # This is already enabled by default
      hardware.opengl.driSupport32Bit = true; # For 32-bit applications
      hardware.opengl.extraPackages = with pkgs; [
        amdvlk
        #vulkan-loader
        #vulkan-validation-layers
        #vulkan-extension-layer
      ];
      hardware.opengl.extraPackages32 = with pkgs; [ 
        driversi686Linux.amdvlk
      ];
     
      # Enable OpenGL
      #hardware.opengl = {
      #  enable = true;
      #  driSupport = true;
      #  driSupport32Bit = true;
      #  extraPackages = with pkgs; [
      #    vulkan-loader
      #    vulkan-validation-layers
      #    vulkan-extension-layer
      #    amdvlk
      #  ];
      #};
     
     
      # Configure console keymap
      console.keyMap = "de";
     
      # Enable CUPS to print documents.
      services.printing.enable = true;
     
      # Enable Bluetooth
      hardware.bluetooth.enable = true;
      hardware.bluetooth.powerOnBoot = true;
     
      # Enable sound with pipewire.
      sound.enable = true;
      hardware.pulseaudio.enable = false;
      security.rtkit.enable = true;
      services.pipewire = {
        enable = true;
        alsa.enable = true;
        alsa.support32Bit = true;
        pulse.enable = true;
        # If you want to use JACK applications, uncomment this
        #jack.enable = true;
     
        # use the example session manager (no others are packaged yet so this is enabled by default,
        # no need to redefine it in your config for now)
        #media-session.enable = true;
      };
     
      # Enable touchpad support (enabled default in most desktopManager).
      # services.xserver.libinput.enable = true;
     
      # Define a user account. Don't forget to set a password with ‘passwd’.
      users.users.xkrenzsim = {
        isNormalUser = true;
        description = "Simon Krenz";
        extraGroups = [ "networkmanager" "wheel" ];
        packages = with pkgs; [
        kate
        #  thunderbird
        ];
      };
     
      # Using zsh
      environment.shells = with pkgs; [ zsh ];
      users.defaultUserShell = pkgs.zsh;
      programs.zsh = {
        enable = true;
        autosuggestions.enable = true;
      };
     
      # Install firefox.
      programs.firefox.enable = true;
     
      # Allow unfree packages
      nixpkgs.config.allowUnfree = true;
     
      # List packages installed in system profile. To search, run:
      # $ nix search wget
      environment.systemPackages = 
        (with pkgs; [
          brave
          clinfo
          git
          glxinfo
          #gnomeExtensions.gtile
          home-manager
          # A full featured CLI system information tool
          inxi
          # Multi-platform app that allows your devices to communicate.
          kdePackages.kdeconnect-kde
          # Components necessary to integrate browsers into the Plasma Desktop.
          kdePackages.plasma-browser-integration
          lutris
          nh
          openssl
          pciutils
          # Install and manage Proton-GE and Luxtorpeda for Steam and 
          # Wine-GE for Lutris with this graphical user interface.
          protonup-qt
          tmux-cssh
          vim
          vulkan-tools
          wayland-utils
          winetricks
          wineWowPackages.waylandFull
          wget
          xwaylandvideobridge
        ]);
     
        #++
     
        #(with pkgs-unstable; [
        #  nh
        #]);
     
      # Some programs need SUID wrappers, can be configured further or are
      # started in user sessions.
      # programs.mtr.enable = true;
      # programs.gnupg.agent = {
      #   enable = true;
      #   enableSSHSupport = true;
      # };
     
      # List services that you want to enable:
     
      # Enable the OpenSSH daemon.
      # services.openssh.enable = true;
     
      # Open ports in the firewall.
      # networking.firewall.allowedTCPPorts = [ ... ];
      # networking.firewall.allowedUDPPorts = [ ... ];
      # Or disable the firewall altogether.
      # networking.firewall.enable = false;
     
      # This value determines the NixOS release from which the default
      # settings for stateful data, like file locations and database versions
      # on your system were taken. It‘s perfectly fine and recommended to leave
      # this value at the release version of the first install of this system.
      # Before changing this value read the documentation for this option
      # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
      system.stateVersion = "23.11"; # Did you read the comment?
     
      # Optimising the NixOS store with automatic options. This will optimise the
      # store on every build which may slow down builds. The alternativ is to set
      # them on specific dates like this:
      # nix.optimise.automatic = true;
      # nix.optimise.dates = [ "03:45" ]; # Optional; allows customizing schedule
      nix.settings.auto-optimise-store = true;
     
    }

For me the configuration that you build clearly generates a sddm.conf.

with having services.displayManager.sddm.wayland.enable set to false

╰─ ls -alh result/etc/sddm.conf
lrwxrwxrwx 2 root root 53  1. Jan 1970  result/etc/sddm.conf -> /nix/store/17zdhjjczgs2xfirz8lzv5pmkwpbl21a-sddm.conf


╰─ cat result/etc/sddm.conf
[General]
DefaultSession=plasma.desktop
DisplayServer=x11
GreeterEnvironment=LANG=C.UTF-8 QT_WAYLAND_SHELL_INTEGRATION=layer-shell
HaltCommand=/run/current-system/systemd/bin/systemctl poweroff
InputMethod=
Numlock=none
RebootCommand=/run/current-system/systemd/bin/systemctl reboot

[Theme]
Current=breeze
CursorSize=24
CursorTheme=breeze_cursors
FacesDir=/run/current-system/sw/share/sddm/faces
ThemeDir=/run/current-system/sw/share/sddm/themes

[Users]
HideShells=/run/current-system/sw/bin/nologin
HideUsers=nixbld1,nixbld10,nixbld11,nixbld12,nixbld13,nixbld14,nixbld15,nixbld16,nixbld17,nixbld18,nixbld19,nixbld2,nixbld20,nixbld21,nixbld22,nixbld23,nixbld24,nixbld25,nixbld26,nixbld27,nixbld28,nixbld29,nixbld3,nixbld30,nixbld31,nixbld32,nixbld4,nixbld5,nixbld6,nixbld7,nixbld8,nixbld9
MaximumUid=30000

[Wayland]
CompositorCommand=
EnableHiDPI=true
SessionDir=/nix/store/fsxrh4ambgsc11arnb7s3fjp9w0kj49y-desktops/share/wayland-sessions

[X11]
DisplayCommand=/nix/store/p5lav04ppa1844r2jn1534qm0fs582d2-Xsetup
DisplayStopCommand=/nix/store/ib5ak7pyc3daypvvq1sycq83awz516x2-Xstop
EnableHiDPI=true
MinimumVT=7
ServerPath=/nix/store/ydybhrzdbwjlws3bb82sna1vr3868r0k-xserver-wrapper
SessionCommand=/nix/store/ar36n7wr14050isypp6440gnpf7lkpwr-xsession-wrapper
SessionDir=/nix/store/fsxrh4ambgsc11arnb7s3fjp9w0kj49y-desktops/share/xsessions
XauthPath=/nix/store/lxwa7w70v4460x4smpsyzw098l87vn7i-xauth-1.1.3/bin/xauth
XephyrPath=/nix/store/0c9wn8nb04qs9kyh2zhll4wzjmp0fmag-xorg-server-21.1.13/bin/Xephyr

with having it true

╭─ ~/dev/test                                                                                                                                                                                                 ✔  took 22s  at 21:37:20 
╰─ ls -alh result/etc/sddm.conf                                
lrwxrwxrwx 2 root root 53  1. Jan 1970  result/etc/sddm.conf -> /nix/store/wrw8qp3fmmi3848j9jqqc687bw9k7qzw-sddm.conf

╭─ ~/dev/test                                                                                                                                                                                                            ✔  at 21:37:30 
╰─ cat result/etc/sddm.conf                                
[General]
DefaultSession=plasma.desktop
DisplayServer=wayland
GreeterEnvironment=LANG=C.UTF-8 QT_WAYLAND_SHELL_INTEGRATION=layer-shell
HaltCommand=/run/current-system/systemd/bin/systemctl poweroff
InputMethod=
Numlock=none
RebootCommand=/run/current-system/systemd/bin/systemctl reboot

[Theme]
Current=breeze
CursorSize=24
CursorTheme=breeze_cursors
FacesDir=/run/current-system/sw/share/sddm/faces
ThemeDir=/run/current-system/sw/share/sddm/themes

[Users]
HideShells=/run/current-system/sw/bin/nologin
HideUsers=nixbld1,nixbld10,nixbld11,nixbld12,nixbld13,nixbld14,nixbld15,nixbld16,nixbld17,nixbld18,nixbld19,nixbld2,nixbld20,nixbld21,nixbld22,nixbld23,nixbld24,nixbld25,nixbld26,nixbld27,nixbld28,nixbld29,nixbld3,nixbld30,nixbld31,nixbld32,nixbld4,nixbld5,nixbld6,nixbld7,nixbld8,nixbld9
MaximumUid=30000

[Wayland]
CompositorCommand=/nix/store/rizf7g8a5w26lxamz1f5d41knd01pivk-kwin-6.0.4.1/bin/kwin_wayland --no-global-shortcuts --no-kactivities --no-lockscreen --locale1
EnableHiDPI=true
SessionDir=/nix/store/fsxrh4ambgsc11arnb7s3fjp9w0kj49y-desktops/share/wayland-sessions

[X11]
DisplayCommand=/nix/store/p5lav04ppa1844r2jn1534qm0fs582d2-Xsetup
DisplayStopCommand=/nix/store/ib5ak7pyc3daypvvq1sycq83awz516x2-Xstop
EnableHiDPI=true
MinimumVT=7
ServerPath=/nix/store/ydybhrzdbwjlws3bb82sna1vr3868r0k-xserver-wrapper
SessionCommand=/nix/store/ar36n7wr14050isypp6440gnpf7lkpwr-xsession-wrapper
SessionDir=/nix/store/fsxrh4ambgsc11arnb7s3fjp9w0kj49y-desktops/share/xsessions
XauthPath=/nix/store/lxwa7w70v4460x4smpsyzw098l87vn7i-xauth-1.1.3/bin/xauth
XephyrPath=/nix/store/0c9wn8nb04qs9kyh2zhll4wzjmp0fmag-xorg-server-21.1.13/bin/Xephyr

The X11 content is there, because you have still set services.xserver.enable = true.
That would be empty if you set it to false, tho that could likely be removed, ill check that out.

But i dont see any problems on the config that you have provided with generating a sddm.conf, so either you have other configs set that you did not include in your example (the steam-apps.nix and hardware-configuration.nix are missing), or some strange setup that hides the /etc, for understanding that it might be helpful to have those files also.

Or if that in overall wasnt the question i possibly just missunderstood you, which is also possibly :slight_smile:

But as it seems to be more a sddm topic, it might be better to open a separat thread then.

2 Likes

That is why I am so confused. As soon as I set services.displayManager.sddm.wayland.enable to true the /etc/sddm.conf is gone. So I will open a new thread for this.

As a little newbie question beside: If I set services.xserver.enable = false my desktop environment is gone and I am only on the cli. How do I enable wayland again?

1 Like

Sandro provided a nice small minimum example for a pure wayland setup in the PR that changed the logic.

I remember that i did the following to use make sure that this is set systemd.defaultUnit = "graphical.target".

But on the final merged version that is automatically set with services.displayManager.enable which is set when enabling sddm.

I am still confused that you claim that sddm.conf is missing when you disable xserver, as that should not be the case and also was not the case for me, when i build your shared config.
It looks to me kind of that sddm is not part of your resulting system top level.
You could possibly double check if its really enabled via nix repl when you load your config and inspect the final values.

1 Like

Sorry, this line was marked as optional, but as I ran repeatedly into issues with it personally, on friends computers, and finally also with someone on Matrix, I decided to make it a default recommendation.

I will revert that change now.

You can just leave this option off, it was only intended to fix some issues, where people would boot into a black screen.

Is it possible to set unstable as default and stable as an option instead?
As in, inverse of the current unstablePkgs pattern like:

$ sudo nix-channel --add nixos-23.11 release nixos-23.11.7237.46397778ef1f nixos-stable

Then in configuration:

let
stablePkgs = import {
config = config.nixpkgs.config;
};
in

for the nix config and revert some packages to stable. Or this sort of thing is unlikely to work? Still relatively new to nix.

1 Like

Hi! Switching to Plasma 6 from Plasma 5.

Should I still keep the services.xserver.enable = true in my config? Or do I need to enable Wayland somehow? Thanks

If it helps, my use cases are gaming on an AMD gpu and schoolwork.

Also, I’m having the same issue mentioned above with an unthemed SDDM when switching to Plasma 6 on Wayland. [EDIT] NEVERMIND! Simply set services.displayManager.sddm.theme = "breeze" and reboot. It seems like you have to reboot, as simply logging in and out again didn’t fix it.

1 Like

If you keep it enabled depends a bit on your needs and if you want to run plasma on xserver.
If you dont plan on that you should be able to disable it. I am running a non xserver plamsa6 fine.
Please keep in mind to set services.displayManager.sddm.wayland.enable to true, otherwise you will not have a login manager available, when disabling xserver.

1 Like

I’ve had to add the gtk2, gtk3 and gtk4 packages alongside Plasma 6 to fix cursor and font issues, among other things, with certain programs. All’s been fine since I figured that out.

Anybody else encountered the same thing? Might be fixed now but I haven’t bothered to take the packages out yet.

1 Like

This worked fine for me, but since Plasma 6 is pretty much stable now, is there any indication of whether it will be included by default in the next release?

edit: Apparently they just released a new version three hours ago which includes Plasma 6 by default! lol

3 Likes

Plasma 6 and Wayland have been working great for me - is there any way to remove KDE 5? The system-path package depends on plasma-integration-6.0.5-qt5, kio5-plugins-only, breeze-6.0.5-qt5, and kio-extras-kf5-24.02.2, which bring in a ton of KDE packages at version 5.116.0. There are KDE6 equivalents to all of those installed, and I don’t think I have any KDE5-specific packages installed, so I’m not sure why these are being brought in.

1 Like

There is a planned transition somewhere during Vicuña IIRC - it will be removed automatically (from a user POV anyway) at some point down the line.

2 Likes

Is it possible to switch to Plasma 6 without moving to nixos-unstable branch? I am trying to precisely exclude stable and include unstable modules, but now I’m stuck with error: The option 'hardware.graphics' does not exist (it is required in services/desktop-managers/lomiri.nix). Here’s what I’ve written in the configuration.nix so far:

disabledModules =
  [
    "services/x11/xserver.nix"
    "services/x11/desktop-managers/plasma5.nix"
    "services/x11/display-managers/default.nix"
    "services/x11/window-managers/fvwm2.nix"
  ];
imports =
  [ # Include the results of the hardware scan.
    ./hardware-configuration.nix
    # Home-manager
    <home-manager/nixos>
    # Plasma 6
    <unstable/nixos/modules/services/x11/xserver.nix>
    <unstable/nixos/modules/services/x11/desktop-managers/plasma5.nix>
    <unstable/nixos/modules/services/x11/display-managers/default.nix>
    <unstable/nixos/modules/services/x11/window-managers/fvwm2.nix>
  ];

Plasma 6 is also available in 24.05, Plasma 6.0 being specific.
Just disabling the stable modules and enabling unstable ones will also not bring other packages into life.

If you mean 6.1, you might need to override the whole plasma pacakge group.
As it will likely the most of your system closure, it might be easier to switch just to nixos-unstable.

About your specific problem, hardware.graphics are new options that have been renamed from hardware.opengl. You are facing that issue due to mixing stable with unstable modules.

1 Like