For whatever reason, the kdePackages.xdg-desktop-portal
will not start with this configuration. I’ve tried everything I could find but it seems that I’m the first person with this specific problem. Here is the current configuration:
# manager.nix
{ pkgs, ... }: {
imports = [
./plasma.nix
./hyprland.nix
];
# X11
services.xserver = {
enable = false;
xkb = {
layout = "it";
variant = "";
};
};
# UWSM
programs.uwsm.enable = true;
# SDDM
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "breeze";
};
# Portals
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
};
# Desktop enviroments
plasma.enable = true;
hyprland.enable = true;
}
# plasma.nix
{ pkgs, lib, config, ... }: {
options = {
plasma.enable = lib.mkEnableOption "Enables the KDE Plasma 6 desktop environment";
};
config = lib.mkIf config.plasma.enable {
# Plasma
services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
xwaylandvideobridge
plasma-browser-integration
];
# Portals
xdg.portal.extraPortals = with pkgs.kdePackages; [
xdg-desktop-portal-kde
];
# Packages
environment.systemPackages = with pkgs.kdePackages; [
kate
filelight
discover
];
};
}
This configuration, and every other variant that comes to mind, will install the kdePackages.xdg-desktop-portal-kde
, but fail to start it. This is the output of systemctl --user status plasma-xdg-desktop-portal-kde.service
:
○ plasma-xdg-desktop-portal-kde.service - Xdg Desktop Portal For KDE
Loaded: loaded (/home/leo/.config/systemd/user/plasma-xdg-desktop-portal-kde.service; linked; preset: ignored)
Active: inactive (dead)
P.S.
I’ve tried putting the
xdg.portal.extraPackages
andxdg.portal.enable
everywhere, but with the same result. It’s very likely not a problem with the location of the statements. I know the configuration may seem weird at first and that could be the problem, but I assure you it isn’t. I noticed this problem when I was using thezed-editor
program, to modify my configuration. I tried opening another folder and it hit me with aCouldn't open file picker due to missing xdg-desktop-portal implementation.
.