remove xdg-desktop-portal-gtk service; xdg-desktop-portal knows how to start that itself

This commit is contained in:
Colin 2024-02-12 01:33:34 +00:00
parent db7a414030
commit 66ca822ac1
3 changed files with 3 additions and 27 deletions

View File

@ -92,7 +92,6 @@
./wob.nix
./xarchiver.nix
./xdg-desktop-portal.nix
./xdg-desktop-portal-gtk.nix
./xdg-utils.nix
./zeal.nix
./zecwallet-lite.nix

View File

@ -1,24 +0,0 @@
{ config, ... }:
let
cfg = config.sane.programs.xdg-desktop-portal-gtk;
in
{
sane.programs.xdg-desktop-portal-gtk = {
# the portal handles things like file/app open requests, so it needs access to everything
# any installed app might require.
sandbox.enable = false;
services.xdg-desktop-portal-gtk = {
# xdg-desktop-portal-gtk provides the service/dbus file, but doesn't link the right `wantedBy`
# so have to recreate it here :(
description = "Portal service (GTK/GNOME implementation)";
wantedBy = [ "xdg-desktop-portal.service" ];
before = [ "xdg-desktop-portal.service" ];
serviceConfig = {
ExecStart = "${cfg.package}/libexec/xdg-desktop-portal-gtk";
Type = "dbus";
BusName = "org.freedesktop.impl.portal.desktop.gtk";
};
};
};
}

View File

@ -14,8 +14,9 @@ in
BusName = "org.freedesktop.portal.Desktop";
};
# xdg-desktop-portal needs to know where to find xdg-desktop-portal-gtk, etc, for some reason (???).
# otherwise, it won't expose stuff like the OpenURI endpoint, even if a suitable AppChooser is available on dbus.
# xdg-desktop-portal expects to act as a strict frontend and manage xdg-desktop-portal-{gtk,wlr,etc} itself,
# which means it needs to know how which endpoints each backend provides and how to launch it,
# encoded in /share/xdg-desktop-portal/portals:
environment.XDG_DESKTOP_PORTAL_DIR = "/etc/profiles/per-user/%u/share/xdg-desktop-portal/portals";
};
};