Hi guys!
I’ve read the wiki page about VSCode - Visual Studio Code - Official NixOS Wiki and unfortunately, not vscode-fhs nor vscode packages allow me to use extensions. (I’ve enabled nixpkgs.config.allowUnfree = true; and programs.nix-ld.enable = true;)
First one, as described, should be the easiest one - just add it to the environment.systemPackages = with pkgs; [ and use it as on any other distro. But unfortunately, no, when I try to install any extension from the Marketplace (like Dev Containers), Installing progressbar just scrolls infinitely, but does nothing.
Well, I thought, okay, let’s take the longer but the proper way:
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
vscode
(vscode-with-extensions.override {
vscodeExtensions = with vscode-extensions; [
# bbenoist.nix
ms-python.python
ms-azuretools.vscode-docker
ms-vscode-remote.remote-ssh
vscode-extensions.ms-vscode-remote.remote-containers
];
})
];
}
build, switch, open vscode - and nothing, extensions’ list is empty. After some googling, I’ve found out about ~/.vscode/extensions/extensions.json file, and mine had only [] inside. So I’ve closed VSCode, removed ~/.vscode directory, rebuilt the system, but nothing was created in ~/.vscode. After I started the app once again, the extensions.json was just [] as earlier.
I’ve searched /nix/store for this file and found two, non-empty ones:
venya ~/.config/nixos [main]$ l /nix/store/5i78zdd9i7njb5b312jpbpw8hh4043d6-vscode-extensions-json/share/vscode/extensions/extensions.json
-r--r--r-- 1 root 2,8K янв 1 1970 /nix/store/5i78zdd9i7njb5b312jpbpw8hh4043d6-vscode-extensions-json/share/vscode/extensions/extensions.json
venya ~/.config/nixos [main]$ head /nix/store/5i78zdd9i7njb5b312jpbpw8hh4043d6-vscode-extensions-json/share/vscode/extensions/extensions.json
[{"identifier":{"id":"ms-python.python","uuid":""},"location":{"$mid":1,"fsPath":"/nix/store/9l3mxbcvkpb5y4w4lgc5lyhd0lnyfvlw-vscode-extension-ms-python-python-2025.16.0/share/vscode/extensions/ms-python.python","path":"/nix/store/9l3mxbcvkpb5y4w4lgc5lyhd0lnyfvlw-vscode-extension-ms-python-python-2025.16.0/share/vscode/extensions/ms-python.python","scheme":"file"},"metadata":{"id":"","installedTimestamp":0,"isApplicationScoped":false,"isPreReleaseVersion":false,"preRelease":false,"publisherDisplayName":"ms-python","publisherId":"","targetPlatform":"undefined","updated":false},"relativeLocation":"ms-python.python","version":"2025.16.0"},{"identifier":{"id":"ms-azuretools.vscode-docker","uuid":""},"location":{"$mid":1,"fsPath":"/nix/store/f2mnfky7zmlizz21qf87kvmhz66qh1r9-vscode-extension-ms-azuretools-vscode-docker-2.0.0/share/vscode/extensions/ms-azuretools.vscode-docker","path":"/nix/store/f2mnfky7zmlizz21qf87kvmhz66qh1r9-vscode-extension-ms-azuretools-vscode-docker-2.0.0/share/vscode/extensions/ms-azuretools.vscode-docker","scheme":"file"},"metadata":{"id":"","installedTimestamp":0,"isApplicationScoped":false,"isPreReleaseVersion":false,"preRelease":false,"publisherDisplayName":"ms-azuretools","publisherId":"","targetPlatform":"undefined","updated":false},"relativeLocation":"ms-azuretools.vscode-docker","version":"2.0.0"},{"identifier":{"id":"ms-vscode-remote.remote-ssh","uuid":""},"location":{"$mid":1,"fsPath":"/nix/store/4mp2mpcxp74mz8k3pyc69w14lvlxa3hk-vscode-extension-ms-vscode-remote-remote-ssh-0.120.0/share/vscode/extensions/ms-vscode-remote.remote-ssh","path":"/nix/store/4mp2mpcxp74mz8k3pyc69w14lvlxa3hk-vscode-extension-ms-vscode-remote-remote-ssh-0.120.0/share/vscode/extensions/ms-vscode-remote.remote-ssh","scheme":"file"},"metadata":{"id":"","installedTimestamp":0,"isApplicationScoped":false,"isPreReleaseVersion":false,"preRelease":false,"publisherDisplayName":"ms-vscode-remote","publisherId":"","targetPlatform":"undefined","updated":false},"relativeLocation":"ms-vscode-remote.remote-ssh","version":"0.120.0"},{"identifier":{"id":"ms-vscode-remote.remote-containers","uuid":""},"location":{"$mid":1,"fsPath":"/nix/store/5rvf3hdcsyfwxspax17g0ln7jmcgk7mw-vscode-extension-ms-vscode-remote-remote-containers-0.431.1/share/vscode/extensions/ms-vscode-remote.remote-containers","path":"/nix/store/5rvf3hdcsyfwxspax17g0ln7jmcgk7mw-vscode-extension-ms-vscode-remote-remote-containers-0.431.1/share/vscode/extensions/ms-vscode-remote.remote-containers","scheme":"file"},"metadata":{"id":"","installedTimestamp":0,"isApplicationScoped":false,"isPreReleaseVersion":false,"preRelease":false,"publisherDisplayName":"ms-vscode-remote","publisherId":"","targetPlatform":"undefined","updated":false},"relativeLocation":"ms-vscode-remote.remote-containers","version":"0.431.1"}]
venya ~/.config/nixos [main]$ l /nix/store/r820djzrkin2dgw0i7iw9i1ccwc9fy38-vscode-extensions-json/share/vscode/extensions/extensions.json
-r--r--r-- 1 root 3,5K янв 1 1970 /nix/store/r820djzrkin2dgw0i7iw9i1ccwc9fy38-vscode-extensions-json/share/vscode/extensions/extensions.json
What does it all mean and how do you guys make VSCode work? Also, there were very few other complaints on the internet, looks like it should just work, but not for me for some reason:)
(I’m on 25.11 if it’s relevant)
