nichts/modules/wms/wayland/hyprland/module.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

{
config,
inputs,
lib,
pkgs,
...
}: let
2025-04-09 15:31:18 +02:00
inherit (lib.modules) mkIf;
2025-03-26 19:37:50 +01:00
inherit (lib.options) mkOption;
2025-04-09 15:31:18 +02:00
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
];
2025-03-26 19:37:50 +01:00
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
];
2025-04-06 21:22:39 +02:00
withUWSM = true;
};
# xdg Portal
xdg.portal = {
enable = true;
2025-04-09 15:31:18 +02:00
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-hyprland
];
config = {
2025-04-09 15:31:18 +02:00
common.default = ["*"];
hyprland.default = ["gtk" "hyprland"];
};
};
};
}