From a0daba07c9df5255f51789f77da2006ddc2d27b1 Mon Sep 17 00:00:00 2001 From: repo-worker-code-k Date: Sun, 8 Nov 2026 11:26:16 -0600 Subject: [PATCH 1/2] fix(nixos): start KRDP in the Hyprland session Install KWallet in the user profile for D-Bus activation and start the existing KRDP service with Hyprland as well as Plasma. Refs #5415. --- nixos/hosts/amd-krdp.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/nixos/hosts/amd-krdp.nix b/nixos/hosts/amd-krdp.nix index c5fb0f20ab..7faefaae04 100644 --- a/nixos/hosts/amd-krdp.nix +++ b/nixos/hosts/amd-krdp.nix @@ -15,8 +15,11 @@ # .service, preset-disabled upstream): the Remote Desktop page in System # Settings starts/stops/enables exactly this unit over D-Bus, so the # settings toggle and this declaration manage one and the same service - # instead of fighting. WantedBy plasma-workspace.target means it starts - # with the Plasma session and simply never runs in a non-Plasma one. + # instead of fighting. Start it in either the Plasma or Hyprland session; + # the latter is the AMD host's active desktop. Put KWallet in the user's + # profile as well so its D-Bus activation service is visible to the session + # and KRDP's first wallet request can start kwalletd6 without a competing + # hand-launched daemon. # # No secrets in this repo, by design: # - RDP usernames/passwords are NOT passed on the command line (they @@ -38,7 +41,10 @@ # Until step 2 is done the service runs but has no user that can log # in, which is the safe default. home-manager.users.user = { - home.packages = [ pkgs.kdePackages.krdp ]; + home.packages = [ + pkgs.kdePackages.krdp + pkgs.kdePackages.kwallet + ]; systemd.user.services."app-org.kde.krdpserver" = { Unit = { @@ -46,6 +52,7 @@ After = [ "plasma-xdg-desktop-portal-kde.service" "plasma-core.target" + "xdg-desktop-portal.service" ]; }; Service = { @@ -53,7 +60,10 @@ ExecStart = "${pkgs.kdePackages.krdp}/bin/krdpserver"; Restart = "on-abnormal"; }; - Install.WantedBy = [ "plasma-workspace.target" ]; + Install.WantedBy = [ + "plasma-workspace.target" + "hyprland-session.target" + ]; }; }; } From a942c88b020b4ce60ef1346aacf0378527de8d88 Mon Sep 17 00:00:00 2001 From: repo-worker-tmp-code-b Date: Wed, 11 Nov 2026 11:17:51 -0600 Subject: [PATCH 2/2] fix(nixos): re-scope KRDP start to Plasma session only Remove hyprland-session.target from the krdpserver unit WantedBy: the pinned xdg-desktop-portal-hyprland does not implement org.freedesktop.impl.portal.RemoteDesktop, which KRDP PortalSession requires, so a Hyprland-started server could never serve a desktop (Codex P2 / CodeRabbit major on PR #7767). Keeps the KWallet package and portal ordering that fix the wallet-backed user store (#5415). Rationale recorded in the amd-krdp.nix header. Task 14995 / #8734. --- nixos/hosts/amd-krdp.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/nixos/hosts/amd-krdp.nix b/nixos/hosts/amd-krdp.nix index 7faefaae04..50664d8271 100644 --- a/nixos/hosts/amd-krdp.nix +++ b/nixos/hosts/amd-krdp.nix @@ -15,11 +15,20 @@ # .service, preset-disabled upstream): the Remote Desktop page in System # Settings starts/stops/enables exactly this unit over D-Bus, so the # settings toggle and this declaration manage one and the same service - # instead of fighting. Start it in either the Plasma or Hyprland session; - # the latter is the AMD host's active desktop. Put KWallet in the user's - # profile as well so its D-Bus activation service is visible to the session - # and KRDP's first wallet request can start kwalletd6 without a competing - # hand-launched daemon. + # instead of fighting. WantedBy plasma-workspace.target means it starts + # with the Plasma session and simply never runs in a non-Plasma one. + # Put KWallet in the user's profile as well so its D-Bus activation + # service is visible to the session and KRDP's first wallet request can + # start kwalletd6 without a competing hand-launched daemon. + # + # Hyprland is deliberately NOT a start target for now (re-scope of the + # original change, task 14995 / issue #8734): KRDP's PortalSession + # requires the org.freedesktop.impl.portal.RemoteDesktop portal + # interface, and the pinned xdg-desktop-portal-hyprland does not + # implement it, so a krdpserver started in the Hyprland session could + # never serve a desktop. Add "hyprland-session.target" back to + # WantedBy below only once a RemoteDesktop-capable portal backend + # exists for the Hyprland session. # # No secrets in this repo, by design: # - RDP usernames/passwords are NOT passed on the command line (they @@ -60,10 +69,7 @@ ExecStart = "${pkgs.kdePackages.krdp}/bin/krdpserver"; Restart = "on-abnormal"; }; - Install.WantedBy = [ - "plasma-workspace.target" - "hyprland-session.target" - ]; + Install.WantedBy = [ "plasma-workspace.target" ]; }; }; }