Skip to content

devenv.nix options

enterShell

Bash code to execute when entering the shell.

Type: strings concatenated with "\n"

Default

""

env

Environment variables to be exposed inside the developer environment.

Type: attribute set

Default

{}

languages.c.enable

Whether to enable Enable tools for C development..

Type: boolean

Default

false

Example

true

languages.clojure.enable

Whether to enable Enable tools for Clojure development..

Type: boolean

Default

false

Example

true

languages.cplusplus.enable

Whether to enable Enable tools for C++ development..

Type: boolean

Default

false

Example

true

languages.cue.enable

Whether to enable Enable tools for Cue development..

Type: boolean

Default

false

Example

true

languages.cue.package

The CUE package to use.

Type: package

Default

"pkgs.cue"

languages.dotnet.enable

Whether to enable Enable tools for .NET development..

Type: boolean

Default

false

Example

true

languages.elixir.enable

Whether to enable Enable tools for Elixir development..

Type: boolean

Default

false

Example

true

languages.elixir.package

Which package of Elixir to use

Type: package

Default

"pkgs.elixir"

languages.elm.enable

Whether to enable Enable tools for Elm development..

Type: boolean

Default

false

Example

true

languages.erlang.enable

Whether to enable Enable tools for Erlang development..

Type: boolean

Default

false

Example

true

languages.erlang.package

Which package of Erlang to use

Type: package

Default

"pkgs.erlang"

languages.go.enable

Whether to enable Enable tools for Go development..

Type: boolean

Default

false

Example

true

languages.haskell.enable

Whether to enable Enable tools for Haskell development..

Type: boolean

Default

false

Example

true

languages.java.enable

Whether to enable tools for Java development.

Type: boolean

Default

false

Example

true

languages.java.gradle.enable

Whether to enable gradle.

Type: boolean

Default

false

Example

true

languages.java.gradle.package

The gradle package to use. The gradle package by default inherits the JDK from languages.java.jdk.package.

Type: package

Default

{"_type":"literalExpression","text":"pkgs.gradle.override { jdk = cfg.jdk.package; }"}

languages.java.jdk.package

The JDK package to use. This will also become available as JAVA_HOME.

Type: package

Default

{"_type":"literalExpression","text":"pkgs.jdk"}

Example

{"_type":"derivation","name":"openjdk-8u322-ga"}

languages.java.maven.enable

Whether to enable maven.

Type: boolean

Default

false

Example

true

languages.java.maven.package

The maven package to use. The maven package by default inherits the JDK from languages.java.jdk.package.

Type: package

Default

"pkgs.maven.override { jdk = cfg.jdk.package; }"

languages.javascript.enable

Whether to enable Enable tools for JavaScript development..

Type: boolean

Default

false

Example

true

languages.kotlin.enable

Whether to enable Enable tools for Kotlin development..

Type: boolean

Default

false

Example

true

languages.lua.enable

Whether to enable Enable tools for Lua development..

Type: boolean

Default

false

Example

true

languages.lua.package

The Lua package to use.

Type: package

Default

"pkgs.lua"

languages.nix.enable

Whether to enable Enable tools for Nix development..

Type: boolean

Default

false

Example

true

languages.ocaml.enable

Whether to enable Enable tools for OCaml development..

Type: boolean

Default

false

Example

true

languages.perl.enable

Whether to enable Enable tools for Perl development..

Type: boolean

Default

false

Example

true

languages.php.enable

Whether to enable Enable tools for OHP development..

Type: boolean

Default

false

Example

true

languages.python.enable

Whether to enable Enable tools for Python development..

Type: boolean

Default

false

Example

true

languages.r.enable

Whether to enable Enable tools for R development..

Type: boolean

Default

false

Example

true

languages.ruby.enable

Whether to enable Enable tools for Ruby development..

Type: boolean

Default

false

Example

true

languages.rust.enable

Whether to enable Enable tools for Rust development..

Type: boolean

Default

false

Example

true

languages.scala.enable

Whether to enable Enable tools for Scala development..

Type: boolean

Default

false

Example

true

languages.typescript.enable

Whether to enable Enable tools for TypeScript development..

Type: boolean

Default

false

Example

true

packages

A list of packages to expose inside the developer environment. Search available packages using devenv search NAME.

Type: list of package

Default

[]

postgres.createDatabase

Create a database named like current user on startup.

Type: boolean

Default

true

postgres.enable

Whether to enable Add postgresql process and expose utilities..

Type: boolean

Default

false

Example

true

postgres.initdbArgs

Additional arguments passed to initdb during data dir initialisation.

Type: list of strings concatenated with "\n"

Default

["--no-locale"]

Example

["--data-checksums","--allow-group-access"]

postgres.package

Which version of postgres to use

Type: package

Default

"pkgs.postgresql"

pre-commit

Integration of https://github.com/cachix/pre-commit-hooks.nix

Type: submodule

Default

{}

pre-commit.default_stages

A configuration wide option for the stages property. Installs hooks to the defined stages. See .

Type: list of string

Default

["commit"]

pre-commit.excludes

Exclude files that were matched by these patterns.

Type: list of string

Default

[]

pre-commit.hooks

The hook definitions.

Pre-defined hooks can be enabled by, for example:

hooks.nixpkgs-fmt.enable = true; The pre-defined hooks are:

actionlint

Static checker for GitHub Actions workflow files.

alejandra

The Uncompromising Nix Code Formatter.

ansible-lint

Ansible linter.

black

The uncompromising Python code formatter.

brittany

Haskell source code formatter.

cabal-fmt

Format Cabal files

cabal2nix

Run cabal2nix on all *.cabal files to generate corresponding default.nix files.

cargo-check

Check the cargo package for errors.

chktex

LaTeX semantic checker

clang-format

Format your code using clang-format.

clippy

Lint Rust code.

deadnix

Scan Nix files for dead code (unused variable bindings).

dhall-format

Dhall code formatter.

elm-format

Format Elm files.

elm-review

Analyzes Elm projects, to help find mistakes before your users find them.

elm-test

Run unit tests and fuzz tests for Elm code.

eslint

Find and fix problems in your JavaScript code.

fourmolu

Haskell code prettifier.

govet

Checks correctness of Go programs.

hadolint

Dockerfile linter, validate inline bash.

hindent

Haskell code prettifier.

hlint

HLint gives suggestions on how to improve your source code.

hpack

hpack converts package definitions in the hpack format (package.yaml) to Cabal files.

html-tidy

HTML linter.

hunspell

Spell checker and morphological analyzer.

isort

A Python utility / library to sort imports.

latexindent

Perl script to add indentation to LaTeX files.

luacheck

A tool for linting and static analysis of Lua code.

markdownlint

Style checker and linter for markdown files.

mdsh

Markdown shell pre-processor.

nix-linter

Linter for the Nix expression language.

nixfmt

Nix code prettifier.

nixpkgs-fmt

Nix code prettifier.

ormolu

Haskell code prettifier.

prettier

Opinionated multi-language code formatter.

purs-tidy

Format purescript files.

purty

Format purescript files.

revive

A linter for Go source code.

rustfmt

Format Rust code.

shellcheck

Format shell files.

shfmt

Format shell files.

statix

Lints and suggestions for the Nix programming language.

stylish-haskell

A simple Haskell code prettifier

stylua

An Opinionated Lua Code Formatter.

terraform-format

Format terraform (.tf) files.

yamllint

Yaml linter.

Type: attribute set of (submodule)

Default

{}

pre-commit.hooks.<name>.description

Description of the hook. used for metadata purposes only.

Type: string

Default

""

pre-commit.hooks.<name>.enable

Whether to enable this pre-commit hook.

Type: boolean

Default

false

pre-commit.hooks.<name>.entry

The entry point - the executable to run. can also contain arguments that will not be overridden, such as entry = "autopep8 -i";.

Type: string

pre-commit.hooks.<name>.excludes

Exclude files that were matched by these patterns.

Type: list of string

Default

[]

pre-commit.hooks.<name>.files

The pattern of files to run on.

Type: string

Default

""

pre-commit.hooks.<name>.language

The language of the hook - tells pre-commit how to install the hook.

Type: string

Default

"system"

pre-commit.hooks.<name>.name

The name of the hook - shown during hook execution.

Type: string

Default

{"_type":"literalDocBook","text":"internal name, same as id"}

pre-commit.hooks.<name>.pass_filenames

Whether to pass filenames as arguments to the entry point.

Type: boolean

Default

true

pre-commit.hooks.<name>.raw

Raw fields of a pre-commit hook. This is mostly for internal use but exposed in case you need to work around something.

Default: taken from the other hook options.

Type: attribute set of unspecified value

pre-commit.hooks.<name>.stages

Confines the hook to run at a particular stage.

Type: list of string

Default

{"_type":"literalExpression","text":"default_stages"}

pre-commit.hooks.<name>.types

List of file types to run on. See Filtering files with types.

Type: list of string

Default

["file"]

pre-commit.hooks.<name>.types_or

List of file types to run on, where only a single type needs to match.

Type: list of string

Default

[]

pre-commit.installationScript

A bash snippet that installs nix-pre-commit-hooks in the current directory

Type: string

pre-commit.package

The pre-commit package to use.

Type: package

Default

{"_type":"literalExpression","text":"pkgs.pre-commit\n"}

pre-commit.rootSrc

The source of the project to be checked.

This is used in the derivation that performs the check.

If you use the flakeModule, the default is self.outPath; the whole flake sources.

Type: path

Default

{"_type":"literalExpression","text":"gitignoreSource config.src"}

pre-commit.run

A derivation that tests whether the pre-commit hooks run cleanly on the entire project.

Type: package

Default

"<derivation>"

pre-commit.settings.alejandra.exclude

Files or directories to exclude from formatting.

Type: list of string

Default

[]

Example

["flake.nix","./templates"]

pre-commit.settings.deadnix.fix

Remove unused code and write to source file.

Type: boolean

Default

false

pre-commit.settings.deadnix.noLambdaArg

Don't check lambda parameter arguments.

Type: boolean

Default

false

pre-commit.settings.deadnix.noLambdaPatternNames

Don't check lambda pattern names (don't break nixpkgs callPackage).

Type: boolean

Default

false

pre-commit.settings.deadnix.noUnderscore

Don't check any bindings that start with a _.

Type: boolean

Default

false

pre-commit.settings.deadnix.quiet

Don't print a dead code report.

Type: boolean

Default

false

pre-commit.settings.eslint.binPath

eslint binary path. E.g. if you want to use the eslint in node_modules, use ./node_modules/.bin/eslint.

Type: path

Default

{"_type":"literalExpression","text":"${tools.eslint}/bin/eslint"}

pre-commit.settings.eslint.extensions

The pattern of files to run on, see .

Type: string

Default

"\\.js$"

pre-commit.settings.hpack.silent

Whether generation should be silent.

Type: boolean

Default

false

pre-commit.settings.markdownlint.config

See https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc

Type: attribute set

Default

{}

pre-commit.settings.nix-linter.checks

Available checks. See nix-linter --help-for [CHECK] for more details.

Type: list of string

Default

[]

pre-commit.settings.nixfmt.width

Line width.

Type: null or signed integer

Default

null

pre-commit.settings.ormolu.cabalDefaultExtensions

Use default-extensions from .cabal files.

Type: boolean

Default

false

pre-commit.settings.ormolu.defaultExtensions

Haskell language extensions to enable.

Type: list of string

Default

[]

pre-commit.settings.prettier.binPath

prettier binary path. E.g. if you want to use the prettier in node_modules, use ./node_modules/.bin/prettier.

Type: path

Default

{"_type":"literalExpression","text":"\"${tools.prettier}/bin/prettier\"\n"}

pre-commit.settings.revive.configPath

Path to the configuration TOML file.

Type: string

Default

""

pre-commit.settings.statix.format

Error Output format.

Type: one of "stderr", "errfmt", "json"

Default

"errfmt"

pre-commit.settings.statix.ignore

Globs of file patterns to skip.

Type: list of string

Default

[]

Example

["flake.nix","_*"]

pre-commit.src

Root of the project. By default this will be filtered with the gitignoreSource function later, unless rootSrc is specified.

If you use the flakeModule, the default is self.outPath; the whole flake sources.

Type: path

pre-commit.tools

Tool set from which nix-pre-commit-hooks will pick binaries.

nix-pre-commit-hooks comes with its own set of packages for this purpose.

Type: lazy attribute set of package

Default

{"_type":"literalExpression","text":"pre-commit-hooks.nix-pkgs.callPackage tools-dot-nix { inherit (pkgs) system; }"}

processes

Processes can be started with devenv up and run in foreground mode.

Type: attribute set of (submodule)

Default

{}

processes.<name>.exec

Bash code to run the process.

Type: string

redis.bind

The IP interface to bind to. null means "all interfaces".

Type: null or string

Default

"127.0.0.1"

Example

"127.0.0.1"

redis.enable

Whether to enable Add redis process and expose utilities..

Type: boolean

Default

false

Example

true

redis.extraConfig

Additional text to be appended to redis.conf.

Type: strings concatenated with "\n"

Default

""

redis.package

Which package of redis to use

Type: package

Default

"pkgs.redis"

redis.port

The TCP port to accept connections. If port 0 is specified Redis will not listen on a TCP socket.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

6379

scripts

A set of scripts available when the environment is active.

Type: attribute set of (submodule)

Default

{}

scripts.<name>.exec

Bash code to execute when the script is ran.

Type: string