summaryrefslogtreecommitdiff
path: root/features/xdp.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-08-05 08:16:50 +0530
committersinanmohd <sinan@sinanmohd.com>2023-08-06 11:32:40 +0530
commit3b329553afd1d49f93fde69e4340ca8ca77d4fc9 (patch)
treeec4cd08d9065bb581c59d8c3c3a12d9c97301e3f /features/xdp.nix
parentc7b20600f9ba703e25273635ca6ad6d83ea0573c (diff)
wayland: split wayland and xdg desktop portal
xdp is disabled by default now, and probably will be removed later.
Diffstat (limited to 'features/xdp.nix')
-rw-r--r--features/xdp.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/features/xdp.nix b/features/xdp.nix
new file mode 100644
index 0000000..78ee5f8
--- /dev/null
+++ b/features/xdp.nix
@@ -0,0 +1,27 @@
+{ config, pkgs, ... }:
+
+let
+ # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist
+ dbus-xdp-environment = pkgs.writeTextFile {
+ name = "dbus-xdp-environment";
+ destination = "/bin/dbus-xdp-environment";
+ executable = true;
+
+ text = ''
+ dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=wlroots
+ systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
+ systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
+ '';
+ };
+in
+{
+ # pkgs
+ environment.systemPackages = [ dbus-xdp-environment ];
+
+ # xdg desktop portal
+ xdg.portal = {
+ enable = true;
+ wlr.enable = true;
+ extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
+ };
+}