Fix XDG_DESKTOP_PORTAL by writing it into xinitrc myself
diff --git a/modules/xdg.nix b/modules/xdg.nix
index 5d74fda..e8ad901 100644
--- a/modules/xdg.nix
+++ b/modules/xdg.nix
@@ -1,7 +1,5 @@
{ pkgs, ... }: {
home.home.packages = [ pkgs.xdg-utils ];
- config.xdg.portal = {
- enable = true;
- lxqt.enable = true;
- };
+ config.xdg.portal.enable = false;
+ # ^ portal is enabled in .xinitrc as this didn't work
}
diff --git a/modules/xmonad.nix b/modules/xmonad.nix
index c887ba2..0eca67a 100644
--- a/modules/xmonad.nix
+++ b/modules/xmonad.nix
@@ -29,6 +29,9 @@
fi
'';
home.file.".xinitrc".text = ''
+ export XDG_DESKTOP_PORTAL_DIR=${pkgs.xdg-desktop-portal-gnome}/share/xdg-desktop-portal/portals
+ ${pkgs.xdg-desktop-portal-gnome}/libexec/xdg-desktop-portal-gnome &
+ ${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal &
${home.xsession.windowManager.command}
'';
};