summaryrefslogtreecommitdiff
path: root/system/desktops/hyprland.nix
blob: 91170bddb3ecde0824ab4fe62aca7d51f2a51427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  inputs,
  config,
  pkgs,
  lib,
  ...
}: let
  inherit (lib) mkIf mkDefault;
  cfg = config.desktops.hyprland;
in {
  config = mkIf cfg.enable {
    desktops.wayland.enable = true;

    xdg.portal = {
      extraPortals = [
        inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
      ];
      config = {
        hyprland.common = ["gtk" "hyprland"];
      };
    };

    programs.hyprland = {
      enable = true;
      package = inputs.hyprland.packages.${pkgs.system}.hyprland;
      portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
    };
  };
}