I’m using VSCode Remote SSH to connect to a NixOS host. I haven’t changed anything on the NixOS host side since my last successfully connection. However now, presumably after updating VSCode, I’m seeing an error whenever I attempt to open the terminal pane:
cannot execute /home/skainswo/dev/nixpkgs: NIX_LD or NIX_LD_x86_64-linux is not set
and then an error window stating
The terminal process "/run/current-system/sw/bin/zsh" terminated with exit code: 1.
However, when I test this out via SSH it works just fine:
$ ssh my-machine
skainswo in doodoo in ~
❯ /run/current-system/sw/bin/zsh
skainswo in doodoo in ~
❯ exit
skainswo in doodoo in ~ took 8s
❯ /run/current-system/sw/bin/zsh --version
zsh 5.8.1 (x86_64-pc-linux-gnu)
Any idea what might be causing this? Presumably it’s some kind of NIX_LD issue, but why would that cause zsh to fail to start? And why only in VSCode?
nix-ld shouldn’t be coming into play when running a nix-packaged executable. Why exactly is it trying to run /home/skainswo/dev/nixpkgs? What’s actually at that path?
I’ve had this for ages on my WSL nixos host - I’ve never found any useful logs. I’ve tried following vscode’s debug terminal launch failures guide, I’ve tried logging my shell startup script activity with set -x to a file, I’ve tried I’ve tried watching vscode’s logs, etc
The only thing that I’ve found so far is that if I spam open like 10 terminals at a time, this crash doesn’t happen and I get a perfectly normal terminal. I’m curious if anyone else can confirm this
What a crazy workaround ahahah, that worked, having the exact same problem except it’s The terminal process "/etc/profiles/per-user/yeshey/bin/zsh" terminated with exit code: 1. instead of current-system. And is happening in vscode-server in the browser from my nixOS server, and not in my vscode installed on my local nixOS computer.