-
-
Notifications
You must be signed in to change notification settings - Fork 92
Description
I am unfortunately unable to connect to nixos from vs code. The setup works fine. the service gets created and I use systemctl to start it. However when starting code from within wsl or connecting from VSCode from my Host machine it errors with the following
Using shell environment from invoking shell: /tmp/vscode-distro-env.WSURtA
[2023-11-28 08:45:01.857] Unable to detect if server is already installed: Error: Failed to probe if server is already installed: code: Failed to probe if server is already installed: code: 127, /nix/store/x88ivkf7rmrhd5x3cvyv5vh3zqqdnhsk-bash-interactive-5.2-p15/bin/sh: line 1: uname: command not found
[2023-11-28 08:45:01.857] , install-found
Now what I found is that when connecting to the wsl instance in a shell first
# on host machine
wsl -d nixos
# inside wsl
uname -r
# outputs current kernel version 5.15.123.1-microsoft-standard-WSL2everything works fine
However when running the same command directly from the host machine
wsl -d nixos -- uname -rit will error out with uname not being found just like in the VSCode instance. This might also be related to this issue on NIXOS-WSL nix-community/NixOS-WSL#222
I know wsl support is still a wip in this project but it seems like people have been able to make it work. It would be great if someone had the knowledge what I can do to connect.