diff --git a/nixos/modules/programs/wayland/hyprland.nix b/nixos/modules/programs/wayland/hyprland.nix index 744f7af70fe5..8e6e7ea3f2f4 100644 --- a/nixos/modules/programs/wayland/hyprland.nix +++ b/nixos/modules/programs/wayland/hyprland.nix @@ -83,6 +83,15 @@ in { environment.systemPackages = [ cfg.package ]; + # Hyprland needs permissions to give itself SCHED_RR on startup: + # https://github.com/hyprwm/Hyprland/blob/main/src/init/initHelpers.cpp + security.wrappers.Hyprland = { + owner = "root"; + group = "root"; + capabilities = "cap_sys_nice+ep"; + source = lib.getExe cfg.package; + }; + xdg.portal = { enable = true; extraPortals = [ cfg.portalPackage ];