Skip to content
forked from cachix/devenv

Fast, Declarative, Reproducible, and Composable Developer Environments

License

Notifications You must be signed in to change notification settings

midchildan/devenv

This branch is 1 commit ahead of, 1098 commits behind cachix/devenv:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fdfea02 · May 29, 2024
May 21, 2024
Mar 11, 2024
May 27, 2024
May 27, 2024
May 23, 2024
May 22, 2024
Jul 9, 2023
May 29, 2024
Apr 23, 2024
May 29, 2024
Mar 11, 2024
Mar 11, 2024
May 4, 2024
Apr 21, 2023
May 27, 2024
May 27, 2024
Jul 3, 2023
Mar 22, 2024
Apr 15, 2024
Mar 21, 2024
Mar 11, 2024
Nov 4, 2022
Apr 23, 2024
Apr 23, 2024
Apr 24, 2024
Mar 7, 2023
Jul 20, 2023
Apr 23, 2024
Apr 14, 2024
May 3, 2024
Apr 13, 2024
Apr 13, 2024
May 27, 2024
Apr 13, 2024
Mar 11, 2024
Apr 13, 2024

Repository files navigation

devenv.sh - Fast, Declarative, Reproducible, and Composable Developer Environments

Built with Nix Discord channel License: Apache 2.0 Version CI

logo

Running devenv init generates devenv.nix:

{ pkgs, ... }:

{
  # https://devenv.sh/basics/
  env.GREET = "devenv";

  # https://devenv.sh/packages/
  packages = [ pkgs.git ];

  enterShell = ''
    hello
  '';

  # https://devenv.sh/tests/
  enterTest = ''
    echo "Running tests"
    git --version | grep "2.42.0"
  '';

  # https://devenv.sh/languages/
  languages.nix.enable = true;

  # https://devenv.sh/scripts/
  scripts.hello.exec = "echo hello from $GREET";

  # https://devenv.sh/services/
  services.postgres.enable = true;

  # https://devenv.sh/pre-commit-hooks/
  pre-commit.hooks.shellcheck.enable = true;

  # https://devenv.sh/processes/
  processes.ping.exec = "ping example.com";
}

And devenv shell activates the environment.

Commands

$ devenv
https://devenv.sh 1.0.1: Fast, Declarative, Reproducible, and Composable Developer Environments

Usage: devenv [OPTIONS] <COMMAND>

Commands:
  init       Scaffold devenv.yaml, devenv.nix, .gitignore and .envrc.
  shell      Activate the developer environment. https://devenv.sh/basics/
  update     Update devenv.lock from devenv.yaml inputs. http://devenv.sh/inputs/
  search     Search for packages and options in nixpkgs. https://devenv.sh/packages/#searching-for-a-file
  info       Print information about this developer environment.
  up         Start processes in the foreground. https://devenv.sh/processes/
  processes  Start or stop processes.
  test       Run tests. http://devenv.sh/tests/
  container  Build, copy, or run a container. https://devenv.sh/containers/
  inputs     Add an input to devenv.yaml. https://devenv.sh/inputs/
  gc         Deletes previous shell generations. See http://devenv.sh/garbage-collection
  build      Build any attribute in devenv.nix.
  version    Print the version of devenv.
  help       Print this message or the help of the given subcommand(s)

Options:
  -v, --verbose
          Enable debug log level.
  -j, --max-jobs <MAX_JOBS>
          Maximum number of Nix builds at any time. [default: 8]
  -j, --cores <CORES>
          Maximum number CPU cores being used by a single build.. [default: 2]
  -s, --system <SYSTEM>
          [default: x86_64-linux]
  -i, --impure
          Relax the hermeticity of the environment.
  -c, --clean [<CLEAN>...]
          Ignore existing environment variables when entering the shell. Pass a list of comma-separated environment variables to let through.
  -d, --nix-debugger
          Enter Nix debugger on failure.
  -n, --nix-option <NIX_OPTION> <NIX_OPTION>
          Pass additional options to nix commands, see `man nix.conf` for full list.
  -o, --override-input <OVERRIDE_INPUT> <OVERRIDE_INPUT>
          Override inputs in devenv.yaml.
  -h, --help
          Print help

Documentation

About

Fast, Declarative, Reproducible, and Composable Developer Environments

Resources

License

Stars

Watchers

Forks

Languages

  • Nix 76.0%
  • Rust 22.2%
  • Shell 1.1%
  • Other 0.7%