git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit3572d2f04fb2afe789fd853aeb29c5fa0424e25b authoroxalica <oxalicc@pm.me> dateMon 1 Nov 2021, 04:16 (5 years ago) parent0f57c4b
2 files changed+18
pkgs/desktops/plasma-5/plasma-workspace/0003-startkde-unit-detection.patch+17 pkgs/desktops/plasma-5/plasma-workspace/default.nix+1
pkgs/desktops/plasma-5/plasma-workspace/0003-startkde-unit-detection.patchnew file+17
@@ -0,0 +1,17 @@
1+diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp
2+index a17967b47..6e6141b48 100644
3+--- a/startkde/startplasma.cpp
4++++ b/startkde/startplasma.cpp
5+@@ -431,7 +431,11 @@ bool hasSystemdService(const QString &serviceName)
6+ QStringLiteral("/org/freedesktop/systemd1"),
7+ QStringLiteral("org.freedesktop.systemd1.Manager"),
8+ QStringLiteral("ListUnitFilesByPatterns"));
9+- msg << QStringList({QStringLiteral("enabled"), QStringLiteral("static")}) << QStringList({serviceName});
10++ msg << QStringList({QStringLiteral("enabled"),
11++ QStringLiteral("static"),
12++ QStringLiteral("linked"),
13++ QStringLiteral("linked-runtime")});
14++ msg << QStringList({serviceName});
15+ QDBusReply<QList<QPair<QString, QString>>> reply = QDBusConnection::sessionBus().call(msg);
16+ if (!reply.isValid()) {
17+ return false;
pkgs/desktops/plasma-5/plasma-workspace/default.nix+1
@@ -52,6 +52,7 @@ mkDerivation {
5252 patches = [
5353 ./0001-startkde.patch
5454 ./0002-absolute-wallpaper-install-dir.patch
55+ ./0003-startkde-unit-detection.patch
5556 # Included in 5.23.2
5657 (fetchpatch {
5758 name = "ignore-placeholder-screens";