fix(desktop): add GTK portal so file dialogs work

Home-manager's Hyprland module enables `xdg.portal` and pins the portal
search dir to the user profile with only the Hyprland backend, which has
no FileChooser implementation. File dialogs in Chromium/Electron apps
(signal, brave) fail with a DBus "No such interface
org.freedesktop.portal.FileChooser" error. Add `xdg-desktop-portal-gtk`
at the home-manager layer (system-level extraPortals aren't in the pinned
dir) and route FileChooser to it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 13:56:41 +02:00
parent f35037387c
commit 46cebeb8fd
2 changed files with 20 additions and 1 deletions
+4 -1
View File
@@ -96,7 +96,10 @@
# so the Secret Service is open without a second passphrase.
security.pam.services.greetd.enableGnomeKeyring = true;
# XDG portals (screen sharing, file pickers, and so on).
# XDG portals (screen sharing, file pickers, and so on). The GTK portal (for
# file dialogs) is added at the home-manager layer, not here: home-manager's
# Hyprland module pins the portal search dir to the user profile, so a portal
# listed in this system-level extraPortals is never seen. See modules/home.nix.
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];