I have both KDE Plasma 6 and Hyprland set up on my NixOS systems running using
the nixos-24.11
nixpkgs flake input.
I tried to screenshare today through Discord and the screenshare display/windows list appears empty. Nothing appears in the list. This behaviour is observed both in Hyprland (USWM) and the Wayland session for Plasma 6.
This would lead me to believe that something is wrong with the XDG portal configurations, but I am stumped. I went through the NixOS Stable Manual and NixOS Wiki, but found nothing of help. I also wasn’t able to find a post here on NixOS Discourse that reflected this same issue.
I tested the using the following on both Hyprland (USWM) and the Wayland session for Plasma 6:
- Browser version of Discord on Brave
- Browser version of Discord on Firefox
- The
discord
client app fromnixos-24.11
- The
discord
client app fromnixos-unstable
- The
discord-canary
client app fromnixos-24.11
- The
discord-canary
client app fromnixos-unstable
- The
vesktop
client app fromnixos-24.11
- The
vesktop
client app fromnixos-unstable
- The
discord-screenaudio
client app fromnixos-24.11
- The
discord-screenaudio
client app fromnixos-unstable
I then tried to X11 session for Plasma 6, and that did work, as should be expected.
To confirm that this isn’t specific to Discord, I also tried screensharing with Jitsi and the issue is the same there.
Other than this, the portals seem to be working correctly for other tasks, such as the file chooser, which does work. I am able to open the file chooser and upload the selected files at https://www.amazon.com/sendtokindle in Firefox in Wayland sessions. This makes this more confusing.
Steam also appears to work fine in this regard to the XDG portals working, as it is able to access my games drive mounted in /mnt
for my user.
Any idea what is wrong? What am I missing?
Output of nix-shell -p nix-info --run "nix-info -m"
:
- system: `"x86_64-linux"`
- host os: `Linux 6.12.9, NixOS, 24.11 (Vicuna), 24.11.20250115.e24b4c0`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.24.11`
- nixpkgs: `/nix/store/awsvw44jla0idziiks2zwgzslfd2dczn-source`
System
Configurations
I included potentially related values here from my system configuration.
{ inputs, pkgs, ... }:
{
imports = [ inputs.home-manager.nixosModules.default ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
users."sebas" = import ./users/sebas;
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
programs.hyprland = {
enable = true;
withUWSM = true;
};
services = {
desktopManager.plasma6.enable = true;
gnome.gnome-keyring.enable = true;
gvfs.enable = true;
};
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}
Final Evaluated XDG Portal Values
This is the actual evaluated value of xdg.portal
, which I sourced through the nix repl
. This is what actually gets built.
{
config.xdg.portal = {
config = { };
configPackages = [
"/nix/store/jv8c6l3r7lvyxnlhf8h1jl1zhx2rn3mw-plasma-workspace-6.2.5"
"/nix/store/5034wblcrnara8rjah8ak57z3nlijgq0-hyprland-0.45.2"
];
enable = true;
extraPortals = [
"/nix/store/nhjgy68kzplrqk6i2wqyw3l9r180k4hj-xdg-desktop-portal-gtk-1.15.1"
"/nix/store/klkjvwbjh9f8f5nm0adhyj0v8hcvn4fm-kwallet-6.8.0"
"/nix/store/7a7z07b0jp5f4czdjp914mcr5g7ab3id-xdg-desktop-portal-kde-6.2.5"
"/nix/store/nhjgy68kzplrqk6i2wqyw3l9r180k4hj-xdg-desktop-portal-gtk-1.15.1"
"/nix/store/8nl1bqgcbcc0q9q4djzxb75dmaigrraa-gnome-keyring-46.2"
"/nix/store/44y2l4q82y4c28gnqwm7llpyz2c1l5f3-xdg-desktop-portal-hyprland-1.3.6"
"/nix/store/nhjgy68kzplrqk6i2wqyw3l9r180k4hj-xdg-desktop-portal-gtk-1.15.1"
];
lxqt = {
enable = false;
styles = [ ];
};
wlr = {
enable = false;
settings = { };
};
xdgOpenUsePortal = true;
};
}
Home-Manager
Configurations
{ pkgs, ... }:
{
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
settings.envd = [
"CLUTTER_BACKEND,wayland"
"GDK_BACKEND,wayland,x11,*"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_QPA_PLATFORM,wayland;xcb"
"QT_QPA_PLATFORMTHEME,qt5ct"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"SDL_VIDEODRIVER,wayland"
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_DESKTOP,Hyprland"
"XDG_SESSION_TYPE,wayland"
];
};
xdg = {
enable = true;
portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
/*
I set this as suggested by the home-manager evaluation warning:
##############################################################################################################
evaluation warning: sebas profile: xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you
should either set `xdg.portal.config` or `xdg.portal.configPackages`
to specify which portal backend to use for the requested interface.
https://github.com/flatpak/xdg-desktop-portal/blob/37a6f7c8b8e08b9861f05e172cd4e0d07a832c4d/doc/portals.conf.rst.in
If you simply want to keep the behaviour in < 1.17, which uses the first
portal implementation found in lexicographical order, use the following:
xdg.portal.config.common.default = "*";
##############################################################################################################
*/
config.common.default = "*";
};
};
}
Final Evaluated XDG Portal Values
This is the actual evaluated value of xdg.portal
, which I sourced through the nix repl
. This is what actually gets built.
{
config.home-manager.users."sebas".xdg.portal = {
config = { };
configPackages = [ ];
enable = true;
extraPortals = [
"/nix/store/nhjgy68kzplrqk6i2wqyw3l9r180k4hj-xdg-desktop-portal-gtk-1.15.1"
];
xdgOpenUsePortal = true;
};
}