Confirmed that VSCode Remote-WSL extension works with NixOS

Now that WSL 2 (Windows Subsystem for Linux) has been released from Windows 2004 update, NixOS can be run in Windows machine :tada:
I quickly searched for a way to develop with VSCode Remote-WSL extension, which makes it possible to develop within Windows while testing & running in NixOS, in a single machine. However, no one has posted about this, so I decided to quickly share how I managed to build the environment.

Quick guide to work with Remote-WSL:

What I found out:

2 Likes

Hi!! Nice post, the last time I tried using Remote-SSH in my hyper-v, vscode cannot always detect because of this issue: Does not work if target is a nixos · Issue #648 · microsoft/vscode-remote-release · GitHub

I’ll try this today. Thanks again!

That’s outstanding… It would have never happened in the Guix world…

That’s really cool @sonowz ! Thanks you for testing and sharing this! :smiley:

I’m going to try it against the redistributable NixOS version I’ve forked (https://github.com/Elyhaka/NixOS-WSL/releases/tag/0.0.2 / https://github.com/Elyhaka/NixOS-WSL-DistroLauncher)

I’ll see if I can integrate it directly inside the redistributable version.

We’re getting closer on NixOS support over Windows :smiley:

3 Likes