How to set up stable plasma and keep everything else unstable?

Hi!

I’m trying to set my computer to build with stable plasma but keep the unstable perks. I found that plasma breaks often.

I was trying to use package overlay, but it threw me an error:

{ config, pkgs-stable, ... }:
{
  services.desktopManager.plasma6.enable = true;
  #environment.systemPackages = [ pkgs-stable.kdePackages.plasma-desktop ];
  nixpkgs.overlays = [ (self: super: { kdePackages = pkgs-stable.pkgs.kdePackages; } ) ];
}
user-1@kaktus ~ [1]> sudo nixos-rebuild switch --flake /etc/nixos --no-reexec
building the system configuration...
warning: Git tree '/etc/nixos' is dirty
error:
       … while calling the 'head' builtin
         at /nix/store/rcsmdj802sk3w9l8m0b0bvdy0jiw2wgr-source/lib/attrsets.nix:1696:13:
         1695|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1696|             head values
             |             ^
         1697|           else

       … while evaluating the attribute 'value'
         at /nix/store/rcsmdj802sk3w9l8m0b0bvdy0jiw2wgr-source/lib/modules.nix:1118:7:
         1117|     // {
         1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1119|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/rcsmdj802sk3w9l8m0b0bvdy0jiw2wgr-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `system.systemBuilderArgs':

       … while evaluating definitions from `/nix/store/rcsmdj802sk3w9l8m0b0bvdy0jiw2wgr-source/nixos/modules/system/activation/activatable-system.nix':

       … while evaluating the option `system.activationScripts.etc.text':

       … while evaluating definitions from `/nix/store/rcsmdj802sk3w9l8m0b0bvdy0jiw2wgr-source/nixos/modules/system/etc/etc-activation.nix':

       … while evaluating definitions from `/nix/store/rcsmdj802sk3w9l8m0b0bvdy0jiw2wgr-source/nixos/modules/system/etc/etc.nix':

       … while evaluating the option `environment.etc.dbus-1.source':

       … while evaluating the option `environment.systemPackages':

       … while evaluating definitions from `/nix/store/rcsmdj802sk3w9l8m0b0bvdy0jiw2wgr-source/nixos/modules/services/desktop-managers/plasma6.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: undefined variable 'aurorae'
       at /nix/store/rcsmdj802sk3w9l8m0b0bvdy0jiw2wgr-source/nixos/modules/services/desktop-managers/plasma6.nix:150:11:
          149|         optionalPackages = [
          150|           aurorae
             |           ^
          151|           plasma-browser-integration
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/etc/nixos#nixosConfigurations."kaktus".config.system.build.toplevel' --no-link' returned non-zero exit status 1.
user-1@kaktus ~ [1]> 

Could you help me out with this?

Best,
Miro

What version of NixOS do you have?

Judging by the date (today is October 17, 2025) and the context of your problem, you most likely have NixOS 24.11 or earlier, and you are trying to get Plasma 6, which at that time was only available in nixos-unstable.

I don’t think so:…

user-1@kaktus ~> fastfetch
          β–—β–„β–„β–„       β–—β–„β–„β–„β–„    β–„β–„β–„β––             user-1@kaktus
          β–œβ–ˆβ–ˆβ–ˆβ–™       β–œβ–ˆβ–ˆβ–ˆβ–™  β–Ÿβ–ˆβ–ˆβ–ˆβ–›             ----------------------
           β–œβ–ˆβ–ˆβ–ˆβ–™       β–œβ–ˆβ–ˆβ–ˆβ–™β–Ÿβ–ˆβ–ˆβ–ˆβ–›              OS: NixOS 25.11 (Xantusia) x86_64
            β–œβ–ˆβ–ˆβ–ˆβ–™       β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›               Host: Inspiron 15 3520
     β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™ β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–›     β–Ÿβ–™         Kernel: Linux 6.17.2
    β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™ β–œβ–ˆβ–ˆβ–ˆβ–™    β–Ÿβ–ˆβ–ˆβ–™        Uptime: 55 mins
           β–„β–„β–„β–„β––           β–œβ–ˆβ–ˆβ–ˆβ–™  β–Ÿβ–ˆβ–ˆβ–ˆβ–›        Packages: 4129 (nix-system), 2047 (nix-user), 16 (flatpak-system), 53 (flatpak-user)
          β–Ÿβ–ˆβ–ˆβ–ˆβ–›             β–œβ–ˆβ–ˆβ–› β–Ÿβ–ˆβ–ˆβ–ˆβ–›         Shell: fish 4.1.2
         β–Ÿβ–ˆβ–ˆβ–ˆβ–›               β–œβ–› β–Ÿβ–ˆβ–ˆβ–ˆβ–›          Display (HP 527sh): 1920x1080 in 27", 60 Hz [External] *
β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›                  β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™    Display (CMN1522): 1920x1080 in 16", 120 Hz [Built-in]
β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›                  β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›    DE: KDE Plasma
      β–Ÿβ–ˆβ–ˆβ–ˆβ–› β–Ÿβ–™               β–Ÿβ–ˆβ–ˆβ–ˆβ–›             WM: KWin (Wayland)
     β–Ÿβ–ˆβ–ˆβ–ˆβ–› β–Ÿβ–ˆβ–ˆβ–™             β–Ÿβ–ˆβ–ˆβ–ˆβ–›              WM Theme: Breeze
    β–Ÿβ–ˆβ–ˆβ–ˆβ–›  β–œβ–ˆβ–ˆβ–ˆβ–™           ▝▀▀▀▀               Theme: Breeze (Dark) [Qt]
    β–œβ–ˆβ–ˆβ–›    β–œβ–ˆβ–ˆβ–ˆβ–™ β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›         Icons: breeze [Qt], breeze [GTK2/3/4]
     β–œβ–›     β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–™ β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›          Font: Liberation Serif (11pt) [Qt], Liberation Serif (11pt) [GTK2/3/4]
           β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™       β–œβ–ˆβ–ˆβ–ˆβ–™                Cursor: breeze (24px)
          β–Ÿβ–ˆβ–ˆβ–ˆβ–›β–œβ–ˆβ–ˆβ–ˆβ–™       β–œβ–ˆβ–ˆβ–ˆβ–™               Terminal: kitty 0.43.1
         β–Ÿβ–ˆβ–ˆβ–ˆβ–›  β–œβ–ˆβ–ˆβ–ˆβ–™       β–œβ–ˆβ–ˆβ–ˆβ–™              Terminal Font: Hack-Regular (11pt)
         ▝▀▀▀    β–€β–€β–€β–€β–˜       β–€β–€β–€β–˜              CPU: 12th Gen Intel(R) Core(TM) i5-1235U (12) @ 4.40 GHz
                                               GPU: Intel Iris Xe Graphics @ 1.20 GHz [Integrated]
                                               Memory: 5.77 GiB / 15.31 GiB (38%)
                                               Swap: 0 B / 16.00 GiB (0%)
                                               Disk (/): 683.73 GiB / 936.87 GiB (73%) - btrfs
                                               Local IP (enp0s20f0u2): 10.1.0.2/8
                                               Battery (DELL PG8YJ46): 100% [AC Connected]
                                               Locale: en_GB.UTF-8

                                                                       
                                                                       
user-1@kaktus ~> 

delete it

nixpkgs.overlays = [ (self: super: { kdePackages = pkgs-stable.pkgs.kdePackages; } ) ];

set it

services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
and read

Share your flake.nix, too, we should fix that pkgs-stable pointing at an ancient nixpkgs version. Or your whole configuration, the existence of that input suggests there will be more issues.

1 Like

services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;

This configuration results in an unstable plasma:

user-1@kaktus ~> plasmashell --version
plasmashell 6.4.5
QThreadStorage: entry 8 destroyed before end of thread 0xb5fdaf0
QThreadStorage: entry 2 destroyed before end of thread 0xb5fdaf0
QThreadStorage: entry 1 destroyed before end of thread 0xb5fdaf0
user-1@kaktus ~>

This is my flake:

{
  description = "Nixos config flake";
  inputs = {
    nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
    nixpkgs-24-11.url = "github:nixos/nixpkgs/nixos-24.11";
    nixpkgs-25-05.url = "github:nixos/nixpkgs/nixos-25.05";
    nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
    nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs-unstable";
    };
    nix-index-db = {
      url = "github:nix-community/nix-index-database";
      inputs.nixpkgs.follows = "nixpkgs-unstable";
    };
    plasma-manager = {
      url = "github:nix-community/plasma-manager";
      inputs.nixpkgs.follows = "nixpkgs-unstable";
      inputs.home-manager.follows = "home-manager";
    };
    #nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
    cosmic-manager = {
      url = "github:HeitorAugustoLN/cosmic-manager";
      inputs = {
        nixpkgs.follows = "nixpkgs-unstable";
        home-manager.follows = "home-manager";
      };
    };
    hyprland.url = "github:hyprwm/Hyprland";
    yazi.url = "github:sxyazi/yazi";
  };
  nixConfig = {
    extra-substituters = [
      "https://cache.nixos.org"
      "https://nix-community.cachix.org"
      "https://hyprland.cachix.org"
      "https://cosmic.cachix.org/"
      "https://yazi.cachix.org"
    ];
    extra-trusted-public-keys = [
      "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
      "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
      "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
      "yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
    ];
  };
  outputs = {
    self,
    nixpkgs,
    nixpkgs-unstable,
    nixpkgs-24-11,
    nixpkgs-25-05,
    nixpkgs-stable,
    nix-flatpak,
    home-manager,
    nix-index-db,
    plasma-manager,
    #nixos-cosmic,
    cosmic-manager,
    yazi,
    ...
  }@inputs:
  let
    system = "x86_64-linux";
    args = {
      inherit inputs;
      inherit system;
      pkgs-unstable = import nixpkgs-unstable {
        inherit system;
        config.allowUnfree = true;
      };
      pkgs-24-11 = import nixpkgs-24-11 {
        inherit system;
        config.allowUnfree = true;
      };
      pkgs-25-05 = import nixpkgs-25-05 {
        inherit system;
        config.allowUnfree = true;
      };
      pkgs-stable = import nixpkgs-stable {
        inherit system;
        config.allowUnfree = true;
      };
    };
    speciArgs = {
      inherit inputs;
      inherit system;
      pkgs-unstable = import nixpkgs-unstable {
        inherit system;
        config.allowUnfree = true;
      };
      pkgs-24-11 = import nixpkgs-24-11 {
        inherit system;
        config.allowUnfree = true;
      };
      pkgs-25-05 = import nixpkgs-25-05 {
        inherit system;
        config.allowUnfree = true;
      };
      pkgs-stable = import nixpkgs-stable {
        inherit system;
        config.allowUnfree = true;
      };
      flake-inputs = inputs;
    };
    in
  {
    nixosConfigurations = {
### kaktus ###
      kaktus = nixpkgs-unstable.lib.nixosSystem {
        specialArgs = args;
        modules = [
          nix-flatpak.nixosModules.nix-flatpak
          home-manager.nixosModules.home-manager
          {
            home-manager = {
              useGlobalPkgs = true;
              useUserPackages = true;
              extraSpecialArgs = args;
              sharedModules = [
                plasma-manager.homeModules.plasma-manager
                cosmic-manager.homeManagerModules.cosmic-manager
              ];
              users = {
                user-1 = import ./home-manager/user-1/home.nix;
                user-2 = import ./home-manager/user-2/home.nix;
              };
            };
          }
          nix-index-db.nixosModules.nix-index
          #nixos-cosmic.nixosModules.default
          ./configuration.nix
          ./hosts/kaktus/import.nix
        ];
      };
  };
}