nixos/plasma5: fix mismatch between nix and module system

In https://github.com/NixOS/nixpkgs/pull/254071, a mismatch between usage of
the Nix language and the NixOS module system was introduced. By merging the
kwin_wayland wrapper attrset into the mkIf representation, the former was
effectively ignored.
As a result, the capability wrapper for kwin_wayland stopped being installed,
leading to realtime scheduling being disabled. The issue was not detected
because the behavioral change is very subtle.

By consistently using language-level constructs, this mismatch is resolved.
The capability wrapper is thus installed again and realtime scheduling is
restored.
This commit is contained in:
Alois Wohlschlager 2023-11-04 16:33:38 +01:00
parent f5892ddac1
commit dee9519abe
No known key found for this signature in database
GPG key ID: E0F59EA5E5216914

View file

@ -29,7 +29,7 @@ let
libsForQt5 = pkgs.plasma5Packages;
inherit (libsForQt5) kdeGear kdeFrameworks plasma5;
inherit (lib)
getBin optionalString literalExpression
getBin optionalAttrs optionalString literalExpression
mkRemovedOptionModule mkRenamedOptionModule
mkDefault mkIf mkMerge mkOption mkPackageOptionMD types;
@ -178,7 +178,7 @@ in
capabilities = "cap_sys_nice+ep";
source = "${getBin plasma5.kwin}/bin/kwin_wayland";
};
} // mkIf (!cfg.runUsingSystemd) {
} // optionalAttrs (!cfg.runUsingSystemd) {
start_kdeinit = {
setuid = true;
owner = "root";