Unverified Commit def8d7e2 authored by oxalica's avatar oxalica
Browse files

nixos/plasma6: add CAP_SYS_NICE for kwin_wayland

This makes kwin_wayland successfully gain SCHED_RR priority, which
significantly improves the rendering lag, ie. cursor movement and
desktop animations, under heavy CPU load like on compilation.
This was already enabled for plasma5 but is not for plasma6 somehow.
parent 7db62770
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -286,6 +286,15 @@ in {
      kde-smartcard = lib.mkIf config.security.pam.p11.enable { p11Auth = true; };
    };

    security.wrappers = {
      kwin_wayland = {
        owner = "root";
        group = "root";
        capabilities = "cap_sys_nice+ep";
        source = "${lib.getBin pkgs.kdePackages.kwin}/bin/kwin_wayland";
      };
    };

    programs.dconf.enable = true;

    programs.firefox.nativeMessagingHosts.packages = [kdePackages.plasma-browser-integration];