{ config, lib, pkgs, ... }: with lib; let cfg = config.modules.hyprland; displayCfg = config.modules.display; in { home.packages = with pkgs; [ brightnessctl ]; wayland.windowManager.hyprland = { enable = cfg.enable; package = pkgs.hyprland; systemd.enable = true; settings = { monitor = cfg.monitor; general = { gaps_in = 3; gaps_out = 8; border_size = 2; layout = "dwindle"; }; decoration = { rounding = 8; inactive_opacity = 0.95; blur = { enabled = true; size = 3; passes = 3; new_optimizations = true; }; shadow = { enabled = true; range = 4; render_power = 3; }; }; misc = { initial_workspace_tracking = 2; }; env = [ "ELECTRON_OZONE_PLATFORM_HINT, wayland" "NIXOS_OZONE_WL, 1" "XDG_CURRENT_DESKTOP, Hyprland" "XDG_SESSION_DESKTOP, Hyprland" "XDG_SESSION_TYPE, wayland" "GDK_SCALE, ${toString displayCfg.scale}" ]; xwayland = { enabled = true; force_zero_scaling = true; }; ecosystem = { no_update_news = true; }; }; }; }