These are the options currently declared by javascript-nix
.
They're all great, but javascript-nix does not provide options related to them.
This is because those tools are already packaged in the nixpkgs package
repository, and adding them to a shell is
trivial. To reduce maintenance burden, javascript-nix
only has options for
tools which benefit from a modular configuration, if only slightly.
For example:
# Here's a complete bun development shell
{pkgs, ...}: {packages = [pkgs.bun];}
# Would this be an improvement?
{pkgs, ...}: {
imports = [javascript-nix.shellModules.default];
javascript.bun.enable = true;
};
The examples directory includes several examples like this.
If you notice that a useful option is missing, pull requests to add them are welcome.
The next-generation javascript runtime
If true, the deno runtime is added to the environment.
Default value: false
A non-empty string. If javascript.deno.enable
is true, the DENO_INSTALL_ROOT
variable is set to this value in the environment, and $DENO_INSTALL_ROOT/bin
is added to the PATH
variable.
Default value: "$HOME/.deno"
An array of strings which, if javascript.node.enable
is true, are passed to corepack enable
, creating corepack package manager shims.
Currently, supported values are "yarn"
, "pnpm"
, and "npm"
.
Default value: []
Whether to add the Node.js runtime to the environment.
Default value: false
If set, then the NODE_ENV
variable is set to this value in the environment. The only valid values are "production"
, "development"
, and "test"
.
Default value: unset
If javascript.volta.enable
is true, this package is added to the environment. There are several alternative packages in nixpkgs, such as nodejs-slim
(which lacks npm), or nodejs_22
(the latest version in the 22.x line).
Default value: pkgs.nodejs
The Hassle-Free JavaScript Tool Manager
Whether to add volta to the environment.
Default value: false
A non-empty string. If javascript.volta.enable
is true, the VOLTA_HOME
variable is set to this value in the environment.
Default value: "$HOME/.volta"