summaryrefslogtreecommitdiff
path: root/modules/xdp.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-08-29 12:15:22 +0530
committersinanmohd <sinan@sinanmohd.com>2023-08-29 12:38:25 +0530
commit2a79b770054d1cd4699cdaaae8eab83a8ca92006 (patch)
treebc1cfef81c101e2882df643be876e5e023cbd764 /modules/xdp.nix
parentd0f36974931b425326ada13780e79666500c05a1 (diff)
repo: update the project structure
Diffstat (limited to 'modules/xdp.nix')
-rw-r--r--modules/xdp.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/xdp.nix b/modules/xdp.nix
new file mode 100644
index 0000000..a7adfa5
--- /dev/null
+++ b/modules/xdp.nix
@@ -0,0 +1,27 @@
+{ 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 ];
+ };
+}