summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlois Wohlschlager <alois1@gmx-topmail.de>2023-11-04 16:33:38 +0100
committerAlois Wohlschlager <alois1@gmx-topmail.de>2023-11-04 16:33:38 +0100
commitdee9519abe3a91417886cb912a50b3ad43bd7d67 (patch)
tree63657f6b567ae4e62e14d0e0f9a535bd2cc96653
parentf5892ddac112a1e9b3612c39af1b72987ee5783a (diff)
downloadnixpkgs-dee9519abe3a91417886cb912a50b3ad43bd7d67.tar
nixpkgs-dee9519abe3a91417886cb912a50b3ad43bd7d67.tar.gz
nixpkgs-dee9519abe3a91417886cb912a50b3ad43bd7d67.tar.bz2
nixpkgs-dee9519abe3a91417886cb912a50b3ad43bd7d67.tar.lz
nixpkgs-dee9519abe3a91417886cb912a50b3ad43bd7d67.tar.xz
nixpkgs-dee9519abe3a91417886cb912a50b3ad43bd7d67.tar.zst
nixpkgs-dee9519abe3a91417886cb912a50b3ad43bd7d67.zip
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.
-rw-r--r--nixos/modules/services/x11/desktop-managers/plasma5.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix
index 282a34f6b01..7beac35d449 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";