I don’t use kde / ktexteditor, but I was bored so I had a look. If you build the derivation you get the following:
nix-repl> :b pkgs.libsForQt5.ktexteditor
This derivation produced the following outputs:
bin -> /nix/store/j37kd4y776g52bsx3ppfjiflz5ia68rh-ktexteditor-5.107.0-bin
dev -> /nix/store/44pv25yizzzad458f0m61lcca6y22652-ktexteditor-5.107.0-dev
out -> /nix/store/dinvy8fk9h1lpcknpvlkvxbwr74vsyqz-ktexteditor-5.107.0
If you look at the bin derivation you’ll find
❯ ls /nix/store/j37kd4y776g52bsx3ppfjiflz5ia68rh-ktexteditor-5.107.0-bin/share/polkit-1/actions/org.kde.ktexteditor.katetextbuffer.policy
/nix/store/j37kd4y776g52bsx3ppfjiflz5ia68rh-ktexteditor-5.107.0-bin/share/polkit-1/actions/org.kde.ktexteditor.katetextbuffer.policy
If you enable polkit these are automatically linked. See: https://github.com/NixOS/nixpkgs/blob/66bda599f409f9834c6fd6abc602e452a5c16b61/nixos/modules/security/polkit.nix#L73
So I am assuming that you 1. must install the .bin package and 2. you must enable polkit (security.polkit.enable = true;), and if both of these things have happened then auth hand off will work. That said I haven’t tried any of this because I don’t run any of that. Hopefully if this doesn’t get it working for you it at least points you in the right direction.