nix/module/Portal.nix

27 lines
466 B
Nix
Raw Normal View History

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