Visual Studio Code: Difference between revisions
imported>Samuela No edit summary |
imported>Samuela No edit summary |
||
Line 62: | Line 62: | ||
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). | 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). | ||
=== Nix-sourced client to NixOS host === | === Nix-sourced client to NixOS host === | ||
If vscode-remote is installed from nix (vscode-extensions.ms-vscode-remote as above) on the client machine, | If vscode-remote is installed from nix (vscode-extensions.ms-vscode-remote as above) on the client machine, everything should "just work". | ||
=== Any client to NixOS host === | === Any client to NixOS host === | ||
Use [https://github.com/msteen/nixos-vscode-server nix-vscode-server] on host machines to automate the workaround. | |||
If instead you'd prefer to fix the binaries manually and have to do so every time that you upgrade your VSCode version, then you can install the <code>nodejs-14_x</code> package on the NixOS host and replace the VSCode provided version. This workaround is described here: https://github.com/microsoft/vscode-remote-release/issues/648#issuecomment-503148523. Note that nodejs needs to be updated according to VSCode upstream requirements (nodejs 14 is needed as of 5/14/2021). | |||
== Using nix-shell == | == Using nix-shell == |