You might try the useLocalExtensions option of the remote-ssh extension, if the host also has a local vscode installation.
Slightly off the topic though, if I am going to override the useLocalExtentions
for the callPackage
on remote-ssh
extension in my overlay, what is the proper way to do so?
Just want to have some update:
I have since been using code-server
(Thanks a lot, @offlinehacker !) and everything worked out pretty nicely. I have wrapped it up with a service module (not under home-manager though):
The activation script is also from some posts in this forum. Would like to express my gratitude and hope this helps anyone who is also looking for the solution.
After looking at all the answers, the best way to do it in my experience is using code-server
as @offlinehacker said
I will add on that running code-server in a devShell is very easy. All I did was:
nix-shell -p code-server
Then in my project folder:
nix develop
Then inside the devShell:
code-server
And then I used code-server remotely inside the remote devShell.
Have you tried enabling and configuring nix-ld-rs on NixOS? This should address most of the issues on NixOS and just make it work ™: GitHub - nix-community/nix-ld-rs: Run unpatched dynamic binaries on NixOS [maintainer=@zhaofengli @Mic92]
I enabled it but didn’t add any libraries to the nix ld path. Also, I don’t want to install Rust with nix ld path. I prefer to have it in a flake.nix
so I can specify the rust version per-project.
I would at least at enough libraries to make all the precompiled binaries to work like the server, language server etc. And just use direnv to handle all project dependencies.
The vscode rust-analyzer extension needs Rust for the extension to work