Nix expressions for VS Code Marketplace and Open VSX extensions [maintainers=@deemp, @ameertaweel]
See the codeThis flake provides Nix expressions for the latest pre-release and release versions of the majority of available extensions from the VS Code Marketplace and the Open VSX Registry. A GitHub Action updates these extensions daily.
As of October 2, 2025, the nixpkgs repository contains 456 VS Code extensions. This is a small fraction of the nearly 80,000 extensions available on the VS Code Marketplace. In addition, many of the extensions in nixpkgs are outdated.
Check nix4vscode (and contribute!) if you need not only the latest extension versions.
We have a permission from MS to use a crawler on their API (see the discussion).
Don't abuse this flake!
x86_64-linuxaarch64-linuxaarch64-darwinAlso see:
Read the VS Code page on the NixOS wiki.
nix-command option to use nix repl and other experimental commands (see Start REPL, Explore). This option should already be enabled if you followed the setup instructions for flakes.See Unfree extensions.
Clone this repository and enter its directory.
git clone https://github.com/nix-community/nix-vscode-extensions
cd nix-vscode-extensions
See nix repl.
nix repl
You can search for an extension in the repository history:
git log -S '"copilot"' --oneline data/cache/vscode-marketplace-latest.json0910d1egit grep '"copilot"' 0910d1e -- data/cache/vscode-marketplace-latest.jsonThe ./nix/vscode-with-extensions.nix provides an example of vscode-with-extensions.
This package is VS Code with a couple of extensions.
Run VS Code and list installed extensions.
nix run github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb#default -- --list-extensions
This repository has a flake ./template/flake.nix.
This template provides a VSCodium with a couple of extensions.
Create a flake from the template (see nix flake new).
nix flake new vscodium-project -t github:nix-community/nix-vscode-extensions
cd vscodium-project
git init && git add .
Run VSCodium.
nix run .# .
Alternatively, start a devShell and run VSCodium. A shellHook will print extensions available in the VSCodium.
nix develop .#vscodium
codium .
In case of problems see Troubleshooting.
See Overlays.
If you use NixOS, Home Manager, or similar:
If you use flakes, add nix-vscode-extensions to your flake inputs (see example).
inputs.nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb";
outputs = inputs@{ nix-vscode-extensions, ... }: ...
If you don't use flakes, import the nix-vscode-extensions repository.
let
nix-vscode-extensions = import (
builtins.fetchGit {
url = "https://github.com/nix-community/nix-vscode-extensions";
ref = "refs/heads/master";
rev = "fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb";
}
);
in
Add the nix-vscode-extensions.overlays.default to nixpkgs overlays (see Get extensions via the overlay, example).
(Optional) Allow unfree packages (see Unfree extensions).
Use pkgs.nix-vscode-extensions.vscode-marketplace, pkgs.nix-vscode-extensions.open-vsx and others (see The extensions attrset, Explore, example).
[!NOTE] See With-expressions.
In
with A; with B;, the attributes ofBshadow the attributes ofA.Keep in mind this property of
withwhen writingwith vscode-marketplace; with vscode-marketplace-release;.
extensionsPrerequisites:
nixpkgsnixpkgs with flakesnix-repl> nixpkgs = builtins.getFlake github:NixOS/nixpkgs/0c2094806c9e542f31785ef3569ab9e900e3ce9c
nixpkgs without flakesnix-repl> nixpkgs = (import (builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs";
ref = "refs/heads/master";
rev = "0c2094806c9e542f31785ef3569ab9e900e3ce9c";
}))
nix-vscode-extensionsnix-vscode-extensions with flakesnix-repl> nix-vscode-extensions = builtins.getFlake github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb
nix-vscode-extensions without flakesnix-repl> nix-vscode-extensions = (import (builtins.fetchGit {
url = "https://github.com/nix-community/nix-vscode-extensions";
ref = "refs/heads/master";
rev = "fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb";
}))
extensions attrsetsystemnix-repl> system = builtins.currentSystem
[!TIP]
systemcan be provided byflake-utilsorflake-parts.
extensions via the overlaySee Overlay.
nix-repl> extensions = (import nixpkgs { inherit system; config.allowUnfree = true; overlays = [ nix-vscode-extensions.overlays.default ]; }).nix-vscode-extensions
extensions from nix-vscode-extensionsThe nix-vscode-extensions.extensions attribute is constructed by extending nixpkgs from the nix-vscode-extensions flake inputs with the overlay.
nix-repl> extensions = nix-vscode-extensions.extensions.${system}
We provide attrsets that contain both universal and platform-specific extensions.
We use a reasonable mapping between the sites target platforms and Nix-supported platforms. See:
nix/systemPlatform.nixnumberToPlatform] in nix/overlay.nixextensions attrset[!NOTE] Here,
*stands for a sequence of zero or more characters.
The Get extensions section explains how to get the extensions attrset.
This attrset contains several attributes described in the sections Extension attrsets and Functions that produce extension attrsets.
We have no reliable way to choose the semantically latest cached version of an extension (see cache files).
Therefore, we used the following method:
vscode-marketplace* attrsets contain only extensions from the VS Code Marketplace.The next sections show permitted property combinations and their priorities in corresponding attrsets (1 - the highest priority).
vscode-marketplace and open-vsxvscode-marketplace-release and open-vsx-releasevscode-marketplace-universal and open-vsx-universalvscode-marketplace-release-universal and open-vsx-release-universalforVSCodeVersionforVSCodeVersion version produces an attrset similar to extensions (see The extensions attrset) but containing only the extensions compatible with the version version of VS Code (see Versions compatible with a given version of VS Code).
You should replace version with your VS Code or VSCodium version.
usingFixesFromusingFixesFrom nixpkgsWithFixes produces an attrset where particular extensions have fixes specified in the supplied nixpkgsWithFixes (see mkExtensionNixpkgs in mkExtension.nix, Versions with fixes from particular nixpkgs, Use fixes from nixpkgs).
nixpkgsWithFixes can be any version of nixpkgs (see Get nixpkgs).nixpkgsWithFixes is used only to look up the fixes in its source code and is independent of the nixpkgs that you apply the overlay to.The top-level vscode-marketplace* and open-vsx* attributes are constructed using fixes from nixpkgs that you apply the overlay to (if you get extensions via the overlay) or nixpkgs from the nix-vscode-extensions repository (if you get extensions from nix-vscode-extensions).
.json cache files.<attrset>.<publisher>.<name>, where <attrset> is vscode-marketplace, open-vsx, etc. (see Explore).<attrset>."4"."2".VS Code Marketplace or an Open VSX response about the full set of available extensions (see discussion).nixpkgs for some extensions (see Versions with fixes from particular nixpkgs).nixpkgs stay unfree here (see Unfree software, Special extensions).Set config.allowUnfree = true when constructing pkgs.
# If you use flakes, `system` can be provided
# by `flake-utils` or `flake-parts`.
system = builtins.currentSystem;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ overlays.default ];
}
Override the license of a particular extension.
let
resetLicense =
drv:
drv.overrideAttrs (prev: {
meta = prev.meta // {
license = [ ];
};
});
in
resetLicense <publisher>.<name>
Prerequisites:
[!NOTE] Press the
Tabbutton (denoted as<TAB>below) to see attrset attributes.
extensionsnix-repl> extensions.<TAB>
extensions.forVSCodeVersion extensions.vscode-marketplace
extensions.open-vsx extensions.vscode-marketplace-release
extensions.open-vsx-release extensions.vscode-marketplace-release-universal
extensions.open-vsx-release-universal extensions.vscode-marketplace-universal
extensions.open-vsx-universal
extensions.usingFixesFrom
vscode-marketplace and open-vsxSee vscode-marketplace and open-vsx.
nix-repl> extensions.vscode-marketplace.rust-lang.rust-analyzer.version
"0.4.2638"
nix-repl> extensions.vscode-marketplace.vadimcn.vscode-lldb.version
"1.11.0"
vscode-marketplace-release and open-vsx-releaseSee vscode-marketplace-release and open-vsx-release.
nix-repl> extensions.vscode-marketplace-release.rust-lang.rust-analyzer.version
"0.3.2593"
nix-repl> extensions.vscode-marketplace-release.vadimcn.vscode-lldb.version
"1.11.0"
vscode-marketplace-universal and open-vsx-universalSee vscode-marketplace-universal and open-vsx-universal.
nix-repl> extensions.vscode-marketplace-universal.rust-lang.rust-analyzer.version
"0.4.1067"
nix-repl> extensions.vscode-marketplace-universal.vadimcn.vscode-lldb.version
"1.11.6"
vscode-marketplace-release-universal and open-vsx-release-universalSee vscode-marketplace-release-universal and open-vsx-release-universal.
nix-repl> extensions.vscode-marketplace-release-universal.vadimcn.vscode-lldb.version
"1.11.6"
See forVSCodeVersion.
nix-repl> extensionsCompatible = extensions.forVSCodeVersion "1.78.2"
The extensionsCompatible attrset contains some of the the extensions attrset attributes.
nixpkgsSome extensions require non-trivial fixes (example).
These fixes may be available in a particular version of nixpkgs.
These fixes are read from the source code of that nixpkgs version (see mkExtensionNixpkgs in mkExtension.nix).
nixpkgsIn this case, we use the same version of nixpkgs that was used to get extensions.
You can use any other version instead.
nix-repl> extensionsFixed = extensions.usingFixesFrom nixpkgs
The extensionsFixed attrset contains some of the the extensions attrset attributes.
Some extensions are unavailable or don't work on particular platforms.
These extensions are disabled via ./nix/removed.nix.
Most of the extensions have the override attribute.
This attribute allows you to override the arguments passed to buildVscodeMarketplaceExtension.
Also see:
Example:
jj-view.jj-view extension in vscode-with-extensions.nixSee:
See:
{
"p": "haskell",
"n": "haskell",
"r": 0,
"P": 0,
"v": "2.7.0",
"e": "^1.102.0",
"m": 2,
"h": "sha256-rkQw8A2irw1AcUCnEffG5BNPuQQF9dfjiRHHXPdK/zU="
}
| JSON key | Nix attrname | Description |
|---|---|---|
p | publisher | extension publisher |
n | name | extension name |
r | isRelease | whether it's a release extension version |
P | platform | extension platform |
v | version | extension version |
e | engineVersion | engine version (minimal compatible VSCode version) |
h | hash | extension .vsix hash obtained via nix store prefetch-file |
In the ./nix/overlay.nix:
numberToPlatform converts P to platform;numberToIsRelease converts r to isRelease.mkExtension.nix./nix/mkExtension.nix provides a function to build an extension from an extension config.
Resolve issues.
Make pull requests.
The extra-extensions.toml file contains a list of extensions to be fetched from sites other than VS Code Marketplace and Open VSX.
These extensions replace ones fetched from VS Code Marketplace and Open VSX.
Add necessary extensions there, preferrably, for all supported platforms (see Extensions).
nvfetcher will fetch the latest release versions of these extensions and write configs to generated.nix.
Certain extensions require special treatment.
Provide functions to build such extension in the extensions directory (see extensions/default.nix).
Optionally, create and link issues explaining chosen functions.
Each extension, including Extra extensions, is built via one of the functions in mkExtension.nix.
These functions don't modify the license of (unfree) extensions from nixpkgs.
See the ./haskell/README.md.
Nix-provided VSCodium doesn't pick up the extensions:
Nix-provided VSCodium and start VSCodium again.VSCodium again.Haskell
53.0%
Nix
44.2%
Shell
2.8%
Nix expressions for VS Code Marketplace and Open VSX extensions [maintainers=@deemp, @ameertaweel]
See the codeThis flake provides Nix expressions for the latest pre-release and release versions of the majority of available extensions from the VS Code Marketplace and the Open VSX Registry. A GitHub Action updates these extensions daily.
As of October 2, 2025, the nixpkgs repository contains 456 VS Code extensions. This is a small fraction of the nearly 80,000 extensions available on the VS Code Marketplace. In addition, many of the extensions in nixpkgs are outdated.
Check nix4vscode (and contribute!) if you need not only the latest extension versions.
We have a permission from MS to use a crawler on their API (see the discussion).
Don't abuse this flake!
x86_64-linuxaarch64-linuxaarch64-darwinAlso see:
Read the VS Code page on the NixOS wiki.
nix-command option to use nix repl and other experimental commands (see Start REPL, Explore). This option should already be enabled if you followed the setup instructions for flakes.See Unfree extensions.
Clone this repository and enter its directory.
git clone https://github.com/nix-community/nix-vscode-extensions
cd nix-vscode-extensions
See nix repl.
nix repl
You can search for an extension in the repository history:
git log -S '"copilot"' --oneline data/cache/vscode-marketplace-latest.json0910d1egit grep '"copilot"' 0910d1e -- data/cache/vscode-marketplace-latest.jsonThe ./nix/vscode-with-extensions.nix provides an example of vscode-with-extensions.
This package is VS Code with a couple of extensions.
Run VS Code and list installed extensions.
nix run github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb#default -- --list-extensions
This repository has a flake ./template/flake.nix.
This template provides a VSCodium with a couple of extensions.
Create a flake from the template (see nix flake new).
nix flake new vscodium-project -t github:nix-community/nix-vscode-extensions
cd vscodium-project
git init && git add .
Run VSCodium.
nix run .# .
Alternatively, start a devShell and run VSCodium. A shellHook will print extensions available in the VSCodium.
nix develop .#vscodium
codium .
In case of problems see Troubleshooting.
See Overlays.
If you use NixOS, Home Manager, or similar:
If you use flakes, add nix-vscode-extensions to your flake inputs (see example).
inputs.nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb";
outputs = inputs@{ nix-vscode-extensions, ... }: ...
If you don't use flakes, import the nix-vscode-extensions repository.
let
nix-vscode-extensions = import (
builtins.fetchGit {
url = "https://github.com/nix-community/nix-vscode-extensions";
ref = "refs/heads/master";
rev = "fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb";
}
);
in
Add the nix-vscode-extensions.overlays.default to nixpkgs overlays (see Get extensions via the overlay, example).
(Optional) Allow unfree packages (see Unfree extensions).
Use pkgs.nix-vscode-extensions.vscode-marketplace, pkgs.nix-vscode-extensions.open-vsx and others (see The extensions attrset, Explore, example).
[!NOTE] See With-expressions.
In
with A; with B;, the attributes ofBshadow the attributes ofA.Keep in mind this property of
withwhen writingwith vscode-marketplace; with vscode-marketplace-release;.
extensionsPrerequisites:
nixpkgsnixpkgs with flakesnix-repl> nixpkgs = builtins.getFlake github:NixOS/nixpkgs/0c2094806c9e542f31785ef3569ab9e900e3ce9c
nixpkgs without flakesnix-repl> nixpkgs = (import (builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs";
ref = "refs/heads/master";
rev = "0c2094806c9e542f31785ef3569ab9e900e3ce9c";
}))
nix-vscode-extensionsnix-vscode-extensions with flakesnix-repl> nix-vscode-extensions = builtins.getFlake github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb
nix-vscode-extensions without flakesnix-repl> nix-vscode-extensions = (import (builtins.fetchGit {
url = "https://github.com/nix-community/nix-vscode-extensions";
ref = "refs/heads/master";
rev = "fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb";
}))
extensions attrsetsystemnix-repl> system = builtins.currentSystem
[!TIP]
systemcan be provided byflake-utilsorflake-parts.
extensions via the overlaySee Overlay.
nix-repl> extensions = (import nixpkgs { inherit system; config.allowUnfree = true; overlays = [ nix-vscode-extensions.overlays.default ]; }).nix-vscode-extensions
extensions from nix-vscode-extensionsThe nix-vscode-extensions.extensions attribute is constructed by extending nixpkgs from the nix-vscode-extensions flake inputs with the overlay.
nix-repl> extensions = nix-vscode-extensions.extensions.${system}
We provide attrsets that contain both universal and platform-specific extensions.
We use a reasonable mapping between the sites target platforms and Nix-supported platforms. See:
nix/systemPlatform.nixnumberToPlatform] in nix/overlay.nixextensions attrset[!NOTE] Here,
*stands for a sequence of zero or more characters.
The Get extensions section explains how to get the extensions attrset.
This attrset contains several attributes described in the sections Extension attrsets and Functions that produce extension attrsets.
We have no reliable way to choose the semantically latest cached version of an extension (see cache files).
Therefore, we used the following method:
vscode-marketplace* attrsets contain only extensions from the VS Code Marketplace.The next sections show permitted property combinations and their priorities in corresponding attrsets (1 - the highest priority).
vscode-marketplace and open-vsxvscode-marketplace-release and open-vsx-releasevscode-marketplace-universal and open-vsx-universalvscode-marketplace-release-universal and open-vsx-release-universalforVSCodeVersionforVSCodeVersion version produces an attrset similar to extensions (see The extensions attrset) but containing only the extensions compatible with the version version of VS Code (see Versions compatible with a given version of VS Code).
You should replace version with your VS Code or VSCodium version.
usingFixesFromusingFixesFrom nixpkgsWithFixes produces an attrset where particular extensions have fixes specified in the supplied nixpkgsWithFixes (see mkExtensionNixpkgs in mkExtension.nix, Versions with fixes from particular nixpkgs, Use fixes from nixpkgs).
nixpkgsWithFixes can be any version of nixpkgs (see Get nixpkgs).nixpkgsWithFixes is used only to look up the fixes in its source code and is independent of the nixpkgs that you apply the overlay to.The top-level vscode-marketplace* and open-vsx* attributes are constructed using fixes from nixpkgs that you apply the overlay to (if you get extensions via the overlay) or nixpkgs from the nix-vscode-extensions repository (if you get extensions from nix-vscode-extensions).
.json cache files.<attrset>.<publisher>.<name>, where <attrset> is vscode-marketplace, open-vsx, etc. (see Explore).<attrset>."4"."2".VS Code Marketplace or an Open VSX response about the full set of available extensions (see discussion).nixpkgs for some extensions (see Versions with fixes from particular nixpkgs).nixpkgs stay unfree here (see Unfree software, Special extensions).Set config.allowUnfree = true when constructing pkgs.
# If you use flakes, `system` can be provided
# by `flake-utils` or `flake-parts`.
system = builtins.currentSystem;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ overlays.default ];
}
Override the license of a particular extension.
let
resetLicense =
drv:
drv.overrideAttrs (prev: {
meta = prev.meta // {
license = [ ];
};
});
in
resetLicense <publisher>.<name>
Prerequisites:
[!NOTE] Press the
Tabbutton (denoted as<TAB>below) to see attrset attributes.
extensionsnix-repl> extensions.<TAB>
extensions.forVSCodeVersion extensions.vscode-marketplace
extensions.open-vsx extensions.vscode-marketplace-release
extensions.open-vsx-release extensions.vscode-marketplace-release-universal
extensions.open-vsx-release-universal extensions.vscode-marketplace-universal
extensions.open-vsx-universal
extensions.usingFixesFrom
vscode-marketplace and open-vsxSee vscode-marketplace and open-vsx.
nix-repl> extensions.vscode-marketplace.rust-lang.rust-analyzer.version
"0.4.2638"
nix-repl> extensions.vscode-marketplace.vadimcn.vscode-lldb.version
"1.11.0"
vscode-marketplace-release and open-vsx-releaseSee vscode-marketplace-release and open-vsx-release.
nix-repl> extensions.vscode-marketplace-release.rust-lang.rust-analyzer.version
"0.3.2593"
nix-repl> extensions.vscode-marketplace-release.vadimcn.vscode-lldb.version
"1.11.0"
vscode-marketplace-universal and open-vsx-universalSee vscode-marketplace-universal and open-vsx-universal.
nix-repl> extensions.vscode-marketplace-universal.rust-lang.rust-analyzer.version
"0.4.1067"
nix-repl> extensions.vscode-marketplace-universal.vadimcn.vscode-lldb.version
"1.11.6"
vscode-marketplace-release-universal and open-vsx-release-universalSee vscode-marketplace-release-universal and open-vsx-release-universal.
nix-repl> extensions.vscode-marketplace-release-universal.vadimcn.vscode-lldb.version
"1.11.6"
See forVSCodeVersion.
nix-repl> extensionsCompatible = extensions.forVSCodeVersion "1.78.2"
The extensionsCompatible attrset contains some of the the extensions attrset attributes.
nixpkgsSome extensions require non-trivial fixes (example).
These fixes may be available in a particular version of nixpkgs.
These fixes are read from the source code of that nixpkgs version (see mkExtensionNixpkgs in mkExtension.nix).
nixpkgsIn this case, we use the same version of nixpkgs that was used to get extensions.
You can use any other version instead.
nix-repl> extensionsFixed = extensions.usingFixesFrom nixpkgs
The extensionsFixed attrset contains some of the the extensions attrset attributes.
Some extensions are unavailable or don't work on particular platforms.
These extensions are disabled via ./nix/removed.nix.
Most of the extensions have the override attribute.
This attribute allows you to override the arguments passed to buildVscodeMarketplaceExtension.
Also see:
Example:
jj-view.jj-view extension in vscode-with-extensions.nixSee:
See:
{
"p": "haskell",
"n": "haskell",
"r": 0,
"P": 0,
"v": "2.7.0",
"e": "^1.102.0",
"m": 2,
"h": "sha256-rkQw8A2irw1AcUCnEffG5BNPuQQF9dfjiRHHXPdK/zU="
}
| JSON key | Nix attrname | Description |
|---|---|---|
p | publisher | extension publisher |
n | name | extension name |
r | isRelease | whether it's a release extension version |
P | platform | extension platform |
v | version | extension version |
e | engineVersion | engine version (minimal compatible VSCode version) |
h | hash | extension .vsix hash obtained via nix store prefetch-file |
In the ./nix/overlay.nix:
numberToPlatform converts P to platform;numberToIsRelease converts r to isRelease.mkExtension.nix./nix/mkExtension.nix provides a function to build an extension from an extension config.
Resolve issues.
Make pull requests.
The extra-extensions.toml file contains a list of extensions to be fetched from sites other than VS Code Marketplace and Open VSX.
These extensions replace ones fetched from VS Code Marketplace and Open VSX.
Add necessary extensions there, preferrably, for all supported platforms (see Extensions).
nvfetcher will fetch the latest release versions of these extensions and write configs to generated.nix.
Certain extensions require special treatment.
Provide functions to build such extension in the extensions directory (see extensions/default.nix).
Optionally, create and link issues explaining chosen functions.
Each extension, including Extra extensions, is built via one of the functions in mkExtension.nix.
These functions don't modify the license of (unfree) extensions from nixpkgs.
See the ./haskell/README.md.
Nix-provided VSCodium doesn't pick up the extensions:
Nix-provided VSCodium and start VSCodium again.VSCodium again.Haskell
53.0%
Nix
44.2%
Shell
2.8%