Build, share, and run your local development environments with a single command. Without containers.
Get StartedAny language or tool widely adopted in the industry, prebuilt for Linux/macOS and X64/Arm64. Works with WSL.
Search packages and load them in your developer environment.
Learn more about the basic features.
$ cat devenv.nix { pkgs, ... }: { env.GREET = "determinism"; packages = [ pkgs.git ]; enterShell = "echo hello $GREET"; } $ git --version git: command not found $ devenv shell hello determinism (devenv) $ git --version git version 2.38.1
Define your development processes in a declarative way and start them with devenv up.
Pick from a number of community maintained modules like PostgreSQL, Redis, MySQL, and more are being added each day.
$ cat devenv.nix { pkgs, ... }: { processes.ping.exec = "ping example.com"; postgres.enable = true; } $ devenv up Starting processes ... 20:37:44 system | ping.1 started (pid=94686) 20:37:44 system | postgres.1 started (pid=94688) ...
A single toggle to load the compiler/tools/language server for your favorite language.
$ cat devenv.nix
{ pkgs, ... }: {
languages.python.enable = true;
languages.rust.enable = true;
languages.go.enable = true;
languages.ruby.enable = true;
languages.elm.enable = true;
languages.kotlin.enable = true;
languages.php.enable = true;
languages.typescript.enable = true;
languages.perl.enable = true;
languages.javascript.enable = true;
}
Combined with direnv, your shell will automatically load your environment when you enter the project directory.
$ cd myproject
direnv: loading ~/myproject/.envrc
Building shell ...
Entering shell ...
(devenv) $ cd ..
direnv: unloading
$
Define scripts and git pre-commit hooks to automate your development workflow.
$ cat devenv.nix
{ pkgs, ... }: {
# format Python code on git commit and CI
pre-commit.hooks.black.enable = true;
# aliases
scripts.gd.exec = "git diff --stat";
}
$ devenv shell gd
pre-commit installed at .git/hooks/pre-commit
devenv.lock | 74 ++++++
1 file changed, 71 insertions(+), 0 deletions(-)
After 10 years of experience with the Nix ecosystem, we've built an interface that's intuitive to use.
We're leveraging the power of Nix to build a new generation of developer tools: cachix.org (2018), nix.dev (2020), devenv.sh (2022).