Just in case you’re curious, if you want to find out where a binary is placed in the future, you can use nix-locate (from the nix-index package) like nix-locate bin/plasmashell and it’ll tell you which package it belongs to. In this case, it’s plasma-workspace, so if you want to make the dependency on that package explicit in services.xrdp.defaultWindowManager you were close: you just need to change it to ${pkgs.plasma-workspace}/bin/plasmashell – and pkgs.plasma5.plasma-workspace should work too. You can also use nix repl "<nixpkgs>" and type plasma5 to see what it prints, or even just tab-complete it if you don’t want to evaluate it fully.
This did not work for me! I checked the version of xce4 with nix-locate and xfce4-14 seems to be the correct version. Whatever I try it’s always xrdp comming up. And xrdp crashes with Remmina when loggin in. Does it have to do that I run NixOS on a virtual machine?
Plus the PC I try to connect from runs wayland?
But moving to x11 on the machine that is connecting to the server is a no go for me. I have an old Nvidia card that is only working (very)well on wayland with nuveau driver.
The NixOS PC I want to connect to has x11 with Xfce desktop.