From dee9519abe3a91417886cb912a50b3ad43bd7d67 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sat, 4 Nov 2023 16:33:38 +0100 Subject: 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. --- nixos/modules/services/x11/desktop-managers/plasma5.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos/modules/services/x11') diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index 282a34f6b011..7beac35d449e 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -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"; -- cgit 1.4.1