-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Setup VSCode Remote | ||
|
||
The VSCode Remote server can not be run as-is on NixOS, because it downloads a nodejs binary that | ||
requires `/lib64/ld-linux-x86-64.so.2` to be present, which isn't the case on NixOS. | ||
|
||
There are two options to get the server to run. Both options require `wget` to be installed: | ||
|
||
```nix | ||
environment.systemPackages = [ | ||
pkgs.wget | ||
]; | ||
``` | ||
|
||
## Option 1: Set up nix-ld | ||
|
||
[nix-ld](https://github.com/Mic92/nix-ld) is a program that provides `/lib64/ld-linux-x86-64.so.2`, | ||
allowing foreign binaries to run on NixOS. | ||
|
||
Running the VSCode server on NixOS-WSL requires using [nix-ld-rs](https://github.com/nix-community/nix-ld-rs), instead of the regular nix-ld. | ||
|
||
To set it up, add the following to your configuration: | ||
|
||
```nix | ||
programs.nix-ld = { | ||
enable = true; | ||
package = pkgs.nix-ld-rs; | ||
}; | ||
``` | ||
|
||
## Option 2: Patch the server | ||
|
||
The other option is to replace the nodejs binary that ships with the vscode server with one from the nodejs nixpkgs package. | ||
[This module will set up everything that is required to get it running](https://github.com/K900/vscode-remote-workaround/blob/main/vscode.nix). | ||
If you are [using flakes](./nix-flakes.md), you can add that repo as a flake input and include it from there. | ||
Otherwise, copy the file to your configuration and add it to your imports. | ||
|
||
Add the following to your configuration to enable the module: | ||
|
||
```nix | ||
vscode-remote-workaround.enable = true; | ||
``` |