diff options
author | sinanmohd <sinan@firemail.cc> | 2023-08-05 08:16:50 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-08-06 11:32:40 +0530 |
commit | 6687000fdaabcfcf42a79767bc79350684e0d277 (patch) | |
tree | ec4cd08d9065bb581c59d8c3c3a12d9c97301e3f | |
parent | b118aa9f19cbd60fa4be452e1efad514aefbee67 (diff) |
wayland: split wayland and xdg desktop portal
xdp is disabled by default now, and probably will be removed later.
-rw-r--r-- | features/wayland.nix | 27 | ||||
-rw-r--r-- | features/xdp.nix | 27 |
2 files changed, 29 insertions, 25 deletions
diff --git a/features/wayland.nix b/features/wayland.nix index 53ff77f..20e070b 100644 --- a/features/wayland.nix +++ b/features/wayland.nix @@ -1,19 +1,6 @@ -{ config, pkgs, lib, ... }: +{ 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 - ''; - }; - # gtk theming: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland # for gsettings to work, we need to tell it where the schemas are # using the XDG_DATA_DIR environment variable @@ -43,7 +30,6 @@ in OVMFFull element-desktop firefox - dbus-xdp-environment swaylock swayidle swaybg @@ -61,21 +47,11 @@ in wlr-randr tor-browser-bundle-bin wtype - # gtk configure-gtk dracula-theme # gtk theme - gnome3.adwaita-icon-theme # default gnome cursors glib # gsettings ]; - # xdg desktop portal - services.dbus.enable = true; - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - }; - # font fonts = { fonts = [ pkgs.terminus-nerdfont pkgs.dm-sans ]; @@ -93,6 +69,7 @@ in # misc hardware.opengl.enable = true; + services.dbus.enable = true; programs = { dconf.enable = true; xwayland.enable = true; 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 ]; + }; +} |