Skip to content

Getting Started

Here are the minimum steps to get started.


a) Install Nix

sh <(curl -L --daemon
sh <(curl -L
sh <(curl -L --no-daemon
docker run -it nixos/nix

b) Install Cachix (recommended, speeds up the installation by providing binaries)

nix-env -iA cachix -f
cachix use devenv
nix profile install nixpkgs#cachix
cachix use devenv

c) Install devenv


To update devenv re-run the installation commands below.

If you're getting errors that devenv already exists, run nix profile list and nix profile remove <number> beforehand.

nix-env -if
nix profile install --accept-flake-config github:cachix/devenv/latest 
environment.systemPackages = [ 
  (import (fetchTarball
    inputs.devenv.url = "github:cachix/devenv/latest";

    outputs = { devenv, ... }: {
        packages.x86_64-linux = [devenv.packages.x86_64-linux.devenv];

Initial set up

Given a Git repository, create the initial structure:

$ devenv init
Creating .envrc
Creating devenv.nix
Creating devenv.yaml
Appending .devenv* to .gitignore


  • devenv ci builds your developer environment and makes sure that all checks pass. Useful to run in your continuous integration environment.
  • devenv shell activates your developer environment.
  • devenv search NAME searches packages matching NAME in Nixpkgs input.
  • devenv update updates and pins inputs from devenv.yaml into devenv.lock.
  • devenv gc deletes unused environments to save disk space.
  • devenv up starts processes.

Learn more