devenv-direnvrc(1)
π 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 yourdevenv.nixcomes from. it can be a filesystem path (with thepath: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 indevenv.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 to1/4of your available CPU cores (minimum1). teamwork, but make it limited π-u,--cores <CORES>β how many CPU cores each build gets to use. defaults to available cores divided bymax-jobs(minimum1). 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--optionflag, so like, readman nix.conffor 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 indevenv.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:bashzshfishnu
πΈ 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:truefalse
--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
- nixpkgs unstable: devenv 2.4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms