2024-05-04 23:15:57 +03:00
|
|
|
# Portals are needed for Wayland apps to select files, screen shares etc.
|
2024-10-11 23:27:07 +03:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.module.desktop.portal;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
module.desktop.portal.enable = mkEnableOption "Portals.";
|
|
|
|
};
|
2024-06-25 04:04:39 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
2024-10-14 04:51:19 +03:00
|
|
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
2024-10-11 23:27:07 +03:00
|
|
|
config = {
|
|
|
|
common = {
|
|
|
|
default = [
|
|
|
|
"gtk"
|
|
|
|
"wlr"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
wlr.enable = true;
|
|
|
|
xdgOpenUsePortal = false;
|
|
|
|
};
|
|
|
|
};
|
2024-03-28 12:01:06 +03:00
|
|
|
}
|