From e3ff465632f0a678dc1807f661368682e04915e0 Mon Sep 17 00:00:00 2001 From: dichgrem Date: Tue, 2 Dec 2025 11:36:19 +0800 Subject: [PATCH] fix:portal_services --- home/wayland/niri.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/home/wayland/niri.nix b/home/wayland/niri.nix index f0d7ef9..7e6c67b 100644 --- a/home/wayland/niri.nix +++ b/home/wayland/niri.nix @@ -12,6 +12,22 @@ in niri xwayland-satellite ]; + systemd.user.services.xdg-desktop-portal-gtk = { + Unit = { + Description = "Portal service (GTK implementation)"; + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + }; + Service = { + Type = "dbus"; + BusName = "org.freedesktop.impl.portal.desktop.gtk"; + ExecStart = "${pkgs.xdg-desktop-portal-gtk}/libexec/xdg-desktop-portal-gtk"; + Slice = "session.slice"; + }; + Install = { + WantedBy = ["xdg-desktop-portal.service"]; + }; + }; systemd.user.targets.niri-session = { Unit = { After = "graphical-session-pre.target graphical-session.target"; @@ -24,6 +40,7 @@ in }; }; xdg.portal = { + enable = true; config = { common = { default = ["gtk"];