From 3572d2f04fb2afe789fd853aeb29c5fa0424e25b Mon Sep 17 00:00:00 2001 From: oxalica Date: Mon, 1 Nov 2021 04:16:26 +0800 Subject: [PATCH] plasma-workspace: fix systemd unit detection Our units are links in systemd unit directory, which reports state `linked` or `linked-runtime`. This fixes systemdBoot config and the option `services.xserver.desktopManager.plasma5.runUsingSystemd` for plasma 5.23. --- .../0003-startkde-unit-detection.patch | 17 +++++++++++++++++ .../plasma-5/plasma-workspace/default.nix | 1 + 2 files changed, 18 insertions(+) create mode 100644 pkgs/desktops/plasma-5/plasma-workspace/0003-startkde-unit-detection.patch diff --git a/pkgs/desktops/plasma-5/plasma-workspace/0003-startkde-unit-detection.patch b/pkgs/desktops/plasma-5/plasma-workspace/0003-startkde-unit-detection.patch new file mode 100644 index 000000000000..57779b3f559d --- /dev/null +++ b/pkgs/desktops/plasma-5/plasma-workspace/0003-startkde-unit-detection.patch @@ -0,0 +1,17 @@ +diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp +index a17967b47..6e6141b48 100644 +--- a/startkde/startplasma.cpp ++++ b/startkde/startplasma.cpp +@@ -431,7 +431,11 @@ bool hasSystemdService(const QString &serviceName) + QStringLiteral("/org/freedesktop/systemd1"), + QStringLiteral("org.freedesktop.systemd1.Manager"), + QStringLiteral("ListUnitFilesByPatterns")); +- msg << QStringList({QStringLiteral("enabled"), QStringLiteral("static")}) << QStringList({serviceName}); ++ msg << QStringList({QStringLiteral("enabled"), ++ QStringLiteral("static"), ++ QStringLiteral("linked"), ++ QStringLiteral("linked-runtime")}); ++ msg << QStringList({serviceName}); + QDBusReply>> reply = QDBusConnection::sessionBus().call(msg); + if (!reply.isValid()) { + return false; diff --git a/pkgs/desktops/plasma-5/plasma-workspace/default.nix b/pkgs/desktops/plasma-5/plasma-workspace/default.nix index 17d4bc15e09e..f44becda9020 100644 --- a/pkgs/desktops/plasma-5/plasma-workspace/default.nix +++ b/pkgs/desktops/plasma-5/plasma-workspace/default.nix @@ -52,6 +52,7 @@ mkDerivation { patches = [ ./0001-startkde.patch ./0002-absolute-wallpaper-install-dir.patch + ./0003-startkde-unit-detection.patch # Included in 5.23.2 (fetchpatch { name = "ignore-placeholder-screens";