Set up VSCodium with extensions and executables on its PATH
in several lines of Nix code
See Prerequisites
In a project with multiple subprojects, one needs to switch between toolsets for each subproject.
In some cases, it's convenient to start several VSCodium
instances, one per sub-project.
Then, one needs to decide how to deliver VSCodium
in such a project. There are several options.
- A single
VSCodium
with a superset of required extensions and executables on itsPATH
over the sub-projects. - A
VSCodium
per sub-project - A mix of these
nix develop
codium .
Only one instance of VSCodium
gets supplied extensions.
Close other instances of VSCodium
before opening a new one.
- Create a
classic
PAT with permissions:read:user, repo, user:email, workflow
- Supply it to extensions
Case: VSCodium doesn't have the binaries provided in runtimeDependencies
(like here) on PATH
:
- You need to repair VSCodium's derivation
- Assumptions:
Check
:- Start VSCodium:
nix run .#codium .
- Open a VSCodium terminal
echo $PATH
there- It doesn't contain
/bin
dirs of specifiedruntimeDependencies
- Start VSCodium:
- Close:
- devshells with this VSCodium
- VSCodium itself
- Remove direnv profiles:
cd DIR && rm -rf .direnv
- Open a new terminal,
cd DIR
- Run
nix store repair .#codium
- Make a
Check
(see above) to verify binaries are onPATH
- If still no, continue
- Restart your OS
nix store gc
- collect garbage in Nix store - man- Again, make a
Check