devenv-eval(1)

πŸ“¦
version 2.4.0 Β· 2 versions
, in nixpkgs unstable

πŸ’– devenv-eval(1) β€” the group chat edition πŸ’–

okay so bestie, this is a page from the General Commands Manual, and it's about devenv-eval. grab a boba, we're getting into it πŸ§‹βœ¨


✨ NAME ✨

devenv-eval β€” evaluate, like, any attribute in devenv.nix and hand you back JSON. no cap. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

devenv eval [--user-config] [--from] [-o|--override-input] [-O|--option]
[-j|--max-jobs] [-u|--cores] [-s|--system] [-i|--impure] [--no-impure]
[--offline] [--nix-option] [--nix-debugger] [-c|--clean] [-P|--profile]
[--reload] [--no-reload] [--shell] [--eval-cache] [--no-eval-cache]
[--refresh-eval-cache] [--refresh-task-cache] [--secretspec-provider]
[--secretspec-profile] [--trace-to] [-v|--verbose] [-q|--quiet] [--tui]
[--no-tui] [-h|--help] [ATTRIBUTES]

🌸 DESCRIPTION 🌸

Evaluate any attribute in devenv.nix and return JSON. that's it, that's the whole vibe β€” you point at a thing, it tells you what that thing is, in JSON. iconic. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • --user-config <USER_CONFIG> β€” use this user configuration file instead of the XDG default. main character config file energy, fr fr. 🫢
  • [ATTRIBUTES] β€” the attribute(s) you wanna evaluate. yes bestie, this one's positional.

🌈 INPUT OVERRIDES 🌈

πŸ’œ --from <FROM>

Source for devenv.nix. it can be either a filesystem path (with the path: prefix, don't forget it!) or a flake input reference. lowkey my fave option ngl.

Examples, keep these exactly:

--from github:cachix/devenv
--from github:cachix/devenv?dir=examples/simple
--from path:/absolute/path/to/project
--from path:./relative/path

πŸ’œ -o, --override-input <NAME> <URI>

Override inputs in devenv.yaml. so clutch when you're pointing at your own fork πŸ“

Examples:

--override-input nixpkgs github:NixOS/nixpkgs/nixos-unstable
--override-input nixpkgs path:/path/to/local/nixpkgs

πŸ’œ -O, --option <OPTION:TYPE> <VALUE>

Override configuration options with typed values. yes, you read that right, typed. we're being responsible today ✨

OPTION must include a type: <attribute>:<type>. Supported types are: string, int, float, bool, path, pkg, pkgs.

List types (pkgs) append to existing values by default. add a ! suffix to replace instead: pkgs!. the ! is doing so much work and honestly? slay.

Examples:

--option languages.rust.channel:string beta
--option services.postgres.enable:bool true
--option languages.python.version:string 3.10
--option packages:pkgs "ncdu git"       (appends to packages)
--option packages:pkgs! "ncdu git"      (replaces all packages)

πŸ”₯ NIX OPTIONS πŸ”₯

⭐ -j, --max-jobs <MAX_JOBS>

Maximum number of Nix builds to run concurrently.

Defaults to 1/4 of available CPU cores (minimum 1). not me dividing your cores for you 😭

⭐ -u, --cores <CORES>

Number of CPU cores available to each build.

Defaults to available cores divided by max-jobs (minimum 1).

⭐ -s, --system <SYSTEM>

Override the target system.

Defaults to the host system (e.g. aarch64-darwin, x86_64-linux).

⭐ -i, --impure

Relax the hermeticity of the environment. letting a little chaos in, respectfully πŸŒͺ️

⭐ --no-impure

Force a hermetic environment, overriding config. back in the bubble bestie 🫧

⭐ --offline

Disable substituters and consider all previously downloaded files up-to-date. we're staying in tonight πŸ’…

⭐ --nix-option <NAME> <VALUE>

Pass additional options to nix commands.

These options are passed directly to Nix using the --option flag. See man nix.conf for the full list of available options.

Examples:

--nix-option sandbox false
--nix-option keep-outputs true
--nix-option system x86_64-darwin

⭐ --nix-debugger

Enter the Nix debugger on failure. when things go sideways you get to go in there 😀


🐚 SHELL OPTIONS 🐚

🌸 -c, --clean [<CLEAN>...]

Ignore existing environment variables when entering the shell. pass a list of comma-separated environment variables to let through. fresh start, but like, on your terms ✨

🌸 -P, --profile <PROFILES>

Activate one or more profiles defined in devenv.nix.

Profiles allow you to define different configurations that can be merged with your base configuration.

See https://devenv.sh/profiles for more information.

Examples:

--profile python-3.14
--profile backend --profile fast-startup

🌸 --reload

Enable auto-reload when config files change (default). she's always listening πŸ‘€

🌸 --no-reload

Disable auto-reload when config files change. giving "do not disturb" mode πŸŽ€

🌸 --shell <SHELL_TYPE>

Shell to use for interactive sessions (bash, zsh, fish, nu).

Possible values:

  • bash
  • zsh
  • fish
  • nu

πŸ’€ CACHE OPTIONS πŸ’€

  • --eval-cache β€” enable caching of Nix evaluation results (default). we love a shortcut πŸ“
  • --no-eval-cache β€” disable caching of Nix evaluation results.
  • --refresh-eval-cache β€” force a refresh of the Nix evaluation cache.
  • --refresh-task-cache β€” force a refresh of the task cache.

πŸ™ˆ SECRETSPEC OPTIONS πŸ™ˆ

  • --secretspec-provider <SECRETSPEC_PROVIDER> β€” override the secretspec provider. shh. 🀫
  • --secretspec-profile <SECRETSPEC_PROFILE> β€” override the secretspec profile.

🧚 TRACING OPTIONS 🧚

πŸ¦‹ --trace-to <TRACE_TO>

Enable tracing and set output destination(s). can be repeated for multiple outputs. yes, repeated, stack 'em up πŸ’…

Syntax: [format:]destination

Examples:

--trace-to stderr                              # json to stderr
--trace-to pretty:stderr                       # pretty format to stderr
--trace-to json:file:/tmp/trace.json           # JSON to file
--trace-to otlp-grpc                           # OTLP gRPC to default endpoint
--trace-to otlp-grpc:http://collector:4317     # OTLP gRPC to custom endpoint

Multiple outputs:

--trace-to pretty:stderr --trace-to json:file:/tmp/t.json

Destinations: stdout, stderr, file:<path>, http(s)://<host>:<port>

Formats: json (default), pretty, full, otlp-grpc, otlp-http-protobuf, otlp-http-json

When format is omitted, defaults to json. Tracing is disabled by default.

heads up bestie, these are the env vars: [env: DEVENV_TRACE_TO=] (comma-separated) and [env: DEVENV_TRACE_DEFAULT_TO=] (comma-separated, used only when no explicit tracing is configured; set to empty string to suppress). the empty-string-suppresses thing is important, don't sleep on it πŸŒ™

πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

  • -v, --verbose β€” enable additional debug logs. she said "tell me everything" πŸ—£οΈ
  • -q, --quiet β€” silence all logs. not a peep 🀐
  • --tui <TUI> β€” enable the interactive terminal interface (default when interactive).

Possible values:

  • true
  • false
  • --no-tui β€” disable the interactive terminal interface.
  • -h, --help β€” print help (see a summary with -h).

⚠️ real talk: -h gives you the summary, and full help is the longer version. the page said it, so i'm saying it πŸ’–

and that's the whole page, bestie! πŸŽ‰ this one was from the General Commands Manual, the invocation is eval, and it's filed as devenv-eval(1). go evaluate something iconic. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from