{ lib, config, pkgs, ... }: let inherit (lib) mkIf; cfg = config.desktops; in { config = mkIf cfg.wayland { xdg.portal = { enable = true; xdgOpenUsePortal = true; extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; config = { default.common = ["gtk"]; }; }; programs.xwayland.enable = true; }; }