Error: The top-level xdg-desktop-portal-kde alias has been removed

Hi!
I’ve run into the following problem while updating my system. This is my flake.nix:

{
  description = "Nixos config flake";

  inputs = {
    nixpkgs-unstable = {
      url = "github:nixos/nixpkgs/nixos-unstable";
    };
    nixpkgs-24-11 = {
      url = "github:nixos/nixpkgs/nixos-24.11";
    };
    nix-flatpak = {
      url = "github:gmodena/nix-flatpak/";
    };
    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";
      };
    };
  };
  outputs = {
      self,
      nixpkgs,
      nixpkgs-unstable,
      nixpkgs-24-11,
      nix-flatpak,
      home-manager,
      nix-index-db,
      plasma-manager,
      nixos-cosmic,
      cosmic-manager,
      ...
    }@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;
        };
      };
      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;
        };
        flake-inputs = inputs;
      };
      in
    {
      nixosConfigurations = {
        host-1 = nixpkgs-unstable.lib.nixosSystem {
          specialArgs = args;
          modules = [
            nix-flatpak.nixosModules.nix-flatpak
            home-manager.nixosModules.home-manager
            {
              home-manager = {
                useGlobalPkgs = true;
                useUserPackages = true;
                extraSpecialArgs = speciArgs;
                sharedModules = [
                  plasma-manager.homeManagerModules.plasma-manager
                  cosmic-manager.homeManagerModules.cosmic-manager
                ];
                users = {
paths to user configs
                };
              };
            }
            nix-index-db.nixosModules.nix-index
            nixos-cosmic.nixosModules.default
            ./configuration.nix
            ./host-1/import.nix
          ];
        };
        host-2 = 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.homeManagerModules.plasma-manager
                  cosmic-manager.homeManagerModules.cosmic-manager
                ];
                users = {
paths to user configs
                };
              };
            }
            nix-index-db.nixosModules.nix-index
            nixos-cosmic.nixosModules.default
            ./configuration.nix
            ./host-2/import.nix
          ];
        };
        host-3 = 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.homeManagerModules.plasma-manager
                  cosmic-manager.homeManagerModules.cosmic-manager
                ];
                users = {
paths to user configs
                };
              };
            }
            nix-index-db.nixosModules.nix-index
            nixos-cosmic.nixosModules.default
            ./configuration.nix
            ./host-3/import.nix
          ];
        };
      };
    };
}

When I run nixos-rebuild switch I get this output:

[root@host-1:~]# nixos-rebuild switch 
building the system configuration...
error:
       … while calling the 'head' builtin
         at /nix/store/kcmmd6alr3lx56vkf72503h3pxgf6iv4-source/lib/attrsets.nix:1534:13:
         1533|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1534|             head values
             |             ^
         1535|           else

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

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

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

       … while evaluating the option `xdg.portal.extraPortals':

       … while evaluating definitions from `/nix/store/mh19rx4890bi803nx459m6a8frp235if-source/configuration.nix':

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

       error: The top-level xdg-desktop-portal-kde alias has been removed.

       Please explicitly use kdePackages.xdg-desktop-portal-kde for the latest Qt 6-based version,
       or libsForQt5.xdg-desktop-portal-kde for the deprecated Qt 5 version.

       Note that Qt 5 versions of most KDE software will be removed in NixOS 25.11.

[root@host-1:~]# 

What does it mean?

Somewhere in your config you probably have something like:

environment.systemPackages = with pkgs; [
xdg-desktop-portal-kde
];

The kde plasma 6 packages have been renamed to differentiate with plasma 5. You should now use the following:

environment.systemPackages = with pkgs.kdePackages; [
xdg-desktop-portal-kde
];

If you use the nixos search you will see the changes - it applies to lots of plasma programs as well.

Well… I don’t think so. This is my packages.nix file:

{ config, pkgs-unstable, pkgs-24-11, lib, ...}:

{
  nixpkgs.config.allowUnfree = true;
  environment = {
    systemPackages = [
      pkgs-unstable.kdePackages.partitionmanager
      pkgs-unstable.kdePackages.skanpage

      pkgs-24-11.libreoffice
      pkgs-24-11.jre8
      pkgs-24-11.audacity
      pkgs-unstable.home-manager
      pkgs-24-11.kitty

      pkgs-unstable.onedrive
      pkgs-unstable.vlc

      pkgs-24-11.vscodium

      pkgs-24-11.appimage-run

      pkgs-24-11.emacs
      pkgs-unstable.vulnix
      pkgs-unstable.vim
      pkgs-unstable.ctop
      pkgs-unstable.ftop
      pkgs-unstable.atop
      pkgs-unstable.htop
      pkgs-unstable.btop
      pkgs-unstable.iftop
      pkgs-unstable.powertop
      pkgs-unstable.sl
      pkgs-unstable.fastfetch
      pkgs-24-11.gptfdisk
      pkgs-24-11.usbutils
      pkgs-24-11.exfatprogs
      pkgs-24-11.tree
      pkgs-24-11.lm_sensors
      pkgs-24-11.killall
      pkgs-24-11.stress
      pkgs-24-11.s-tui
      pkgs-24-11.stress-ng
      pkgs-24-11.memtester
      pkgs-unstable.ncdu
      pkgs-unstable.nnn
      pkgs-unstable.fff
      
      pkgs-24-11.ventoy-full
    ];
  };

I also checked home.nix for every user and I didn’t see anything suspicious. For reference these are packages declared in my home.nix:

  home = {
    stateVersion = "24.11";
    username = "jeansibelius";
    homeDirectory = "/home/jeansibelius";
    packages = [
      pkgs-unstable.musescore
      pkgs-unstable.muse-sounds-manager
      pkgs-24-11.frescobaldi

      pkgs-unstable.gimp

      pkgs-unstable.flameshot
      pkgs-unstable.eaglemode
      pkgs-unstable.zathura

      pkgs-unstable.youtube-tui

      pkgs-24-11.libreoffice
      pkgs-24-11.teams-for-linux
      pkgs-24-11.lmms
      pkgs-unstable.lynx

      pkgs-unstable.tagainijisho

      pkgs-unstable.protonvpn-gui
      pkgs-unstable.protonmail-desktop
      pkgs-unstable.proton-pass
      pkgs-24-11.yt-dlp

      pkgs-24-11.mindustry-wayland
      pkgs-unstable.asc

      pkgs-24-11.ventoy-full
    ];
  };

I found it!!!

It was in my configuration.nix:

  xdg.portal = {
    enable = true;
    xdgOpenUsePortal = true;
    extraPortals = [
      pkgs.kdePackages.xdg-desktop-portal-kde
    ];
  };
1 Like