devenv-direnvrc(1)

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

πŸ’– devenv-direnvrc(1) β€” the direnvrc printer, bestie edition πŸŽ€

okay so real quick, the manual name is direnvrc and it lives in section 1 (General Commands Manual), and today we're reading devenv-direnvrc(1) together. grab a snack, it's gonna be cute and it's gonna be thorough πŸ’…


✨ NAME ✨

devenv-direnvrc β€” prints out a direnvrc that adds devenv support to direnv. yes, that's the whole gig. also, go look at https://devenv.sh/integrations/direnv/ because that's literally where the lore lives 🌸

πŸ¦‹ SYNOPSIS πŸ¦‹

devenv direnvrc [--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]

πŸ’œ DESCRIPTION πŸ’œ

Bestie. It prints a direnvrc that adds devenv support to direnv. That's it, that's the function, and it ate πŸ’…

Here's what an example .envrc looks like, and yes I'm giving it to you verbatim because I would never mess with your copy-paste:

eval "$(devenv direnvrc)"

# You can pass flags to the devenv command
# For example: use devenv --impure --option
services.postgres.enable:bool true
use devenv

and again, for the people in the back: https://devenv.sh/integrations/direnv/ ✨


🌈 OPTIONS 🌈

  • --user-config <USER_CONFIG> β€” use this user configuration file instead of the XDG default. main character config file energy πŸ‘‘

πŸ”₯ INPUT OVERRIDES πŸ”₯

  • --from <FROM> β€” where your devenv.nix comes from. it can be a filesystem path (with the path: prefix) or a flake input reference. both are valid, pick your fighter ✨

Examples:

--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> β€” overrides inputs in devenv.yaml. lowkey the most useful thing ever 🫢

Examples:

--override-input nixpkgs github:NixOS/nixpkgs/nixos-unstable
--override-input nixpkgs path:/path/to/local/nixpkgs
  • -O, --option <OPTION:TYPE> <VALUE> β€” overrides configuration options with typed values. ngl the type is not optional, it's mandatory mandatory.

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

List types (pkgs) append to existing values by default. add a ! suffix to replace instead: pkgs! πŸ’€ (yes, that exclamation mark is doing a lot of heavy lifting)

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> β€” the max number of Nix builds running at the same time. defaults to 1/4 of your available CPU cores (minimum 1). teamwork, but make it limited πŸ’…
  • -u, --cores <CORES> β€” how many CPU cores each build gets to use. defaults to available cores divided by max-jobs (minimum 1). sharing is caring πŸŽ€
  • -s, --system <SYSTEM> β€” overrides the target system. defaults to the host system (e.g. aarch64-darwin, x86_64-linux). yes those are the examples, yes I copied them exactly 🌟
  • -i, --impure β€” relaxes the hermeticity of the environment. we're being a little unhinged, as a treat πŸ™ˆ
  • --no-impure β€” forces a hermetic environment, overriding config. the responsible friend 😌
  • --offline β€” disables substituters and treats all previously downloaded files as up-to-date. no thoughts, no network, only vibes ⭐
  • --nix-option <NAME> <VALUE> β€” passes extra options to nix commands. these go directly to Nix via the --option flag, so like, read man nix.conf for the full list of what's available, iykyk πŸ“–

Examples:

--nix-option sandbox false
--nix-option keep-outputs true
--nix-option system x86_64-darwin
  • --nix-debugger β€” enters the Nix debugger on failure. when things go wrong we go ✨investigating✨ πŸ”

🐚 SHELL OPTIONS 🐚

  • -c, --clean [<CLEAN>...] β€” ignores existing environment variables when entering the shell. pass a list of comma-separated environment variables to let through. spring cleaning but for your env πŸ’…
  • -P, --profile <PROFILES> β€” activates one or more profiles defined in devenv.nix. profiles let you define different configurations that get merged with your base configuration β€” like outfits for your config, honestly πŸ‘—

go read https://devenv.sh/profiles for more because it's giving lore.

Examples:

--profile python-3.14
--profile backend --profile fast-startup
  • --reload β€” enables auto-reload when config files change. this is the default, bestie, you're already living it πŸ”„
  • --no-reload β€” disables auto-reload when config files change. you want peace and quiet, I respect it 🫢
  • --shell <SHELL_TYPE> β€” which shell to use for interactive sessions. possible values:
    • bash
    • zsh
    • fish
    • nu

🌸 CACHE OPTIONS 🌸

  • --eval-cache β€” enables caching of Nix evaluation results. default behaviour, iconic, no notes πŸ‘‘
  • --no-eval-cache β€” disables caching of Nix evaluation results. you're on your own babe 😭
  • --refresh-eval-cache β€” forces a refresh of the Nix evaluation cache. out with the old ✨
  • --refresh-task-cache β€” forces a refresh of the task cache. also out with the old, but the task version πŸŽ€

πŸ’€ SECRETSPEC OPTIONS πŸ’€

  • --secretspec-provider <SECRETSPEC_PROVIDER> β€” overrides the secretspec provider 🀫
  • --secretspec-profile <SECRETSPEC_PROFILE> β€” overrides the secretspec profile 🀫✨

⭐ TRACING OPTIONS ⭐

  • --trace-to <TRACE_TO> β€” enables tracing and sets the output destination(s). can be repeated for multiple outputs, which is honestly so fetch.

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 the format is omitted, it defaults to json. Tracing is disabled by default β€” you gotta opt in, babe.

[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). those env vars are real and they matter πŸ’œ

πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

  • -v, --verbose β€” enables additional debug logs. we're nosy today πŸ”
  • -q, --quiet β€” silences all logs. shhhh 🀐
  • --tui <TUI> β€” enables the interactive terminal interface (default when interactive). possible values:
    • true
    • false
  • --no-tui β€” disables the interactive terminal interface. no interface, no problems πŸ’…
  • -h, --help β€” prints help (see a summary with -h). the classic, the legend, the icon πŸŽ€

fr fr, one thing: every flag above matters, so don't skip the boring-sounding ones. --no-impure, --offline, and --no-* variants are doing real work and they will absolutely vibe check your build ✨

and that's the page, bestie πŸ’– this was direnvrc from section 1 of the General Commands Manual β€” page devenv-direnvrc(1) β€” signing off with a lil πŸŽ€ and a whole lot of love πŸŒˆπŸ¦‹πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from