{ config, inputs, lib, pkgs, ... }: let inherit (lib.modules) mkIf; inherit (lib.options) mkOption; inherit (lib.types) bool; cfg = config.modules.desktops.hyprland; in { imports = [ ./binds.nix ./decorations.nix ./exec.nix ./settings.nix ./workspaces.nix inputs.hyprland.nixosModules.default ]; options.modules.desktops.hyprland = { enable = mkOption { type = bool; default = false; description = '' Whether to enable Hyprland wayland compositor. ''; }; }; config = mkIf cfg.enable { programs.hyprland = { enable = true; xwayland.enable = true; package = pkgs.hyprland; portalPackage = pkgs.xdg-desktop-portal-hyprland; plugins = [ pkgs.hyprlandPlugins.hyprsplit ]; withUWSM = true; }; # xdg Portal xdg.portal = { enable = true; xdgOpenUsePortal = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ]; config = { common.default = ["*"]; hyprland.default = ["gtk" "hyprland"]; }; }; }; }