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.

authored by

oxalica and committed by
Peter Hoeg
3572d2f0 0f57c4b9

+18
+17
pkgs/desktops/plasma-5/plasma-workspace/0003-startkde-unit-detection.patch
···
··· 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;
+1
pkgs/desktops/plasma-5/plasma-workspace/default.nix
··· 52 patches = [ 53 ./0001-startkde.patch 54 ./0002-absolute-wallpaper-install-dir.patch 55 # Included in 5.23.2 56 (fetchpatch { 57 name = "ignore-placeholder-screens";
··· 52 patches = [ 53 ./0001-startkde.patch 54 ./0002-absolute-wallpaper-install-dir.patch 55 + ./0003-startkde-unit-detection.patch 56 # Included in 5.23.2 57 (fetchpatch { 58 name = "ignore-placeholder-screens";