Visual Studio Code: Difference between revisions
imported>Jonringer m Minor grammar edits |
imported>Bisserlis Expands on process of using NixOS hosts with VSCode remote-ssh extension |
||
Line 59: | Line 59: | ||
We can retrieve an updated set for manually installed / specified packages by cloning the 'nixpkgs' repo from github, and running: 'nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh' | We can retrieve an updated set for manually installed / specified packages by cloning the 'nixpkgs' repo from github, and running: 'nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh' | ||
== | == remote-ssh == | ||
If vscode-remote is installed from nix (vscode-extensions.ms-vscode-remote) this will automatically replace the node.js shipped by the extension. | The remote-ssh extension works by connecting to a remote host and downloading scripts and pre-built binaries to {{ic|$HOME/.vscode-server}}. When first launching remote-ssh for a NixOS host the connection will fail due to the provided node.js not having been built for a NixOS system (the dynamic libraries aren't in the same place). | ||
This can be resolved by installing the <code>nodejs-12_x</code> package on the NixOS host and replacing the VSCode provided version. | |||
=== NixOS client to NixOS host === | |||
If vscode-remote is installed from nix (vscode-extensions.ms-vscode-remote as above) on the client machine, this will automatically replace the node.js shipped by the extension to the host machine. | |||
=== Any client to NixOS host === | |||
If the client's remote-ssh extension was installed from the VSCode store follow the instructions in https://github.com/microsoft/vscode-remote-release/issues/648#issuecomment-503148523. Note that nodejs needs to be updated according to VS Code upstream requirements (node 12 is needed as of 12/6/2019). | |||
This systemd service automates the binary replacement process. https://github.com/msteen/nixos-vscode-server | |||
== Using nix-shell == | == Using nix-shell == |