Skip to content

Getting Started

Installation

1. Install Nix

sh <(curl -L https://nixos.org/nix/install) --daemon
sh <(curl -L https://nixos.org/nix/install)
sh <(curl -L https://nixos.org/nix/install) --no-daemon
docker run -it nixos/nix

2. Install Cachix

Recommended, speeds up the installation by providing binaries.

nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use devenv
nix profile install nixpkgs#cachix
cachix use devenv

3. Install devenv

nix-env -if https://install.devenv.sh/latest
nix profile install --accept-flake-config tarball+https://install.devenv.sh/latest
configuration.nix
environment.systemPackages = [ 
  (import (fetchTarball https://install.devenv.sh/latest)).default
];

Updating

Follow the instructions for an installation above.

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
Done.

Commands

  • 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