{ config, lib, ... }: let cfg = config.alqueva.support; inherit (lib) mkEnableOption; in { options.alqueva.support = { wayland = mkEnableOption "wayland support"; }; config = lib.mkIf cfg.wayland { xdg.portal = { enable = true; xdgOpenUsePortal = true; }; environment.sessionVariables = { "NIXOS_OZONE_WL" = "1"; "QT_QPA_PLATFORM" = "wayland"; }; }; }