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.
This 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.
We have a permission from MS to use a crawler on their API (see the discussion).
Don't abuse this flake!
Check nix4vscode (and contribute!) if you need more extension versions.
Read the VS Code page on the NixOS wiki.
- Read about Nix flakes.
- Set them up.
- Enable the
nix-commandoption to usenix repland 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-extensionsSee nix repl.
nix replsystem="$(nix-instantiate --eval --expr "builtins.currentSystem")"On my system:
printf "$system"
"x86_64-linux"Note
You can use the value that you got on your machine instead of builtins.currentSystem in instructions below.
You can search for an extension in the repository history:
- Get commits containing the extension:
git log -S '"copilot"' --oneline data/cache/vscode-marketplace-latest.json - Select a commit, e.g.:
0910d1e - Search in that commit:
git grep '"copilot"' 0910d1e -- data/cache/vscode-marketplace-latest.json
The ./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-extensionsThis repository has a flake template.
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. AshellHookwill print extensions available in theVSCodium.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-extensionsto 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-extensionsrepository.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.defaulttonixpkgsoverlays (see Getextensionsvia the overlay, example). -
(Optional) Allow unfree packages (see Unfree extensions).
-
Use
pkgs.nix-vscode-extensions.vscode-marketplace,pkgs.nix-vscode-extensions.open-vsxand others (see Theextensionsattrset, Explore, example).
Note
See With-expressions.
In with A; with B;, the attributes of B shadow the attributes of A.
Keep in mind this property of with when writing with vscode-marketplace; with vscode-marketplace-release;.
nix-repl> nixpkgs = builtins.getFlake github:NixOS/nixpkgs/674c2b09c59a220204350ced584cadaacee30038nix-repl> nixpkgs = (import (builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs";
ref = "refs/heads/master";
rev = "674c2b09c59a220204350ced584cadaacee30038";
}))nix-repl> nix-vscode-extensions = builtins.getFlake github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baebnix-repl> nix-vscode-extensions = (import (builtins.fetchGit {
url = "https://github.com/nix-community/nix-vscode-extensions";
ref = "refs/heads/master";
rev = "fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb";
}))nix-repl> extensions = (import nixpkgs { system = builtins.currentSystem; config.allowUnfree = true; overlays = [ nix-vscode-extensions.overlays.default ]; }).nix-vscode-extensionsnix-repl> extensions = nix-vscode-extensions.extensions.${builtins.currentSystem}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 systemPlatform in flake.nix, issue).
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:
- We chose properties of extension versions that may predict whether a version is the latest one:
- whether a version is pre-release or release;
- whether a version is universal or platform-specific.
- We prioritized all combinations of property values.
- We created several attrsets of extensions with constraints on possible combinations of property values.
- We named attrsets to show additional constraints. E.g.,
vscode-marketplace*attrsets contain only extensions from theVS Code Marketplace. - In each attrset, for each extension whose versions could be in that attrset, we provided a single highest-priority version of that extension.
The next sections show permitted property combinations and their priorities in corresponding attrsets.
- pre-release platform-specific
- pre-release universal
- release platform-specific
- release universal
- release platform-specific
- release universal
- pre-release universal
- release universal
- release universal
forVSCodeVersion 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.
usingFixesFrom 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).
- The supplied
nixpkgsWithFixescan be any version ofnixpkgs(see Getnixpkgs). - The supplied
nixpkgsWithFixesis used only to look up the fixes in its source code and is independent of thenixpkgsthat 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).
- Extension publishers and names are lowercased only in Nix.
- They're not lowercased in
.jsoncache files.
- They're not lowercased in
- Access an extension in the format
<attrset>.<publisher>.<name>, where<attrset>isvscode-marketplace,open-vsx, etc. (see Explore). - If an extension publisher or name aren't valid Nix identifiers, quote them like
<attrset>."4"."2".
- Some previously available extensions may be unavailable in newer versions of this flake.
- An extension is missing if it doesn't appear during a particular workflow run in a
VS Code Marketplaceor anOpen VSXresponse about the full set of available extensions (see discussion). - We let missing extensions remain in cache files and plan to purge missing extensions periodically (see #139).
- An extension is missing if it doesn't appear during a particular workflow run in a
- We don't automatically handle extension packs. You should look up extensions in a pack and explicitly write all necessary extensions.
- We use derivations and code from
nixpkgsfor some extensions (see Versions with fixes from particularnixpkgs). - Unfree extensions from
nixpkgsstay unfree here (see Unfree software, Special extensions). - If you want to use unfree extensions, try one of the following ways:
-
Set
config.allowUnfree = truewhen constructingpkgs.pkgs = import nixpkgs { system = builtins.currentSystem; 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>
Note
Press the Tab button (denoted as <TAB> below) to see attrset attributes.
nix-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.usingFixesFromSee 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"See 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"See 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"See 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.
Some 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).
In 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 nixpkgsThe 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 removed.nix.
See:
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 ./flake.nix:
numberToPlatformconvertsPtoplatform;numberToIsReleaseconvertsrtoisRelease.
./nix/mkExtension.nix provides a function to build an extension from an extension config.
Resolve issues.
Make pull requests.
- Fix links.
- Write new sections.
- Update commit hashes used in examples if they're too old.
- Enhance the text.
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.
- If
Nix-providedVSCodiumdoesn't pick up the extensions:- Close other instances of
Nix-providedVSCodiumand startVSCodiumagain. - Try to reboot your computer and start
VSCodiumagain.
- Close other instances of