nixcfg/modules/nixos/desktop/addons/xdg-portal/default.nix
2024-01-11 10:31:04 +00:00

25 lines
519 B
Nix

{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.desktop.addons.xdg-portal;
in
{
options.plusultra.desktop.addons.xdg-portal = with types; {
enable = mkBoolOpt false "Whether or not to add support for xdg portal.";
};
config = mkIf cfg.enable {
xdg = {
portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
gtkUsePortal = true;
};
};
};
}