Sudo helix / nvim


I noticed when using helix (a text editor) hx and sudo hx that they do not share a config and sudo hx is actually not able to copy/paste to the clipboard.
Tested it as a normal system package and as a home-manager package, both have this problem.

Also sudo nvim has the clipboard problem, did not test the config though.

Is this intended behavior to separate the normal and root users? How would one go about to configure the root’s config declaratively, I did not see an option in home-manager for this?

sudo doesnt conserve your environment so that’s expected. You can try with sudo -E but even better, to edit files use sudoedit