Sign inSign up

matthisk/nix-direnv-kit

By matthisk

•Updated 3 days ago

Sandbox Kit
0

174

matthisk/nix-direnv-kit repository overview

Digest

sha256:c5865d25e0d0…

Size

67.3 MB

Schema

v3

Pushed

3 days ago

Specificationspec.yaml

MIXIN

Single-user Nix (flakes enabled), direnv and nix-direnv, wired so that the workspace .envrc is loaded automatically: a direnv hook for interactive bash, and a BASH_ENV / CLAUDE_ENV_FILE hook so agent command shells get the same environment. nix-direnv state lives in the sandbox, not in the host-shared .direnv directory.


Arguments
NameRequiredDefaultDescription
autoAllowOptionaltrue

Trust every .envrc under the sandbox workspace (direnv whitelist), so no `direnv allow` is needed. Set to "false" to approve .envrc files by hand.

Options: true, false
localCacheOptional

URL of a binary cache on the host (for example a caching proxy in front of cache.nixos.org at http://host.docker.internal:8080). Nix tries it first and falls back to cache.nixos.org. Empty disables it. The kit's network policy allows only host.docker.internal:8080; for another host or port, add it with `sbx policy allow network`.

nixpkgsRefOptionalnixos-26.05

nixpkgs branch, tag or commit that nix, direnv and nix-direnv are built from (github:NixOS/nixpkgs/<ref>). Only affects the installed tools, not the project's flake inputs.

prewarmOptionaltrue

On every sandbox start, evaluate the workspace .envrc in the background so the first agent command does not wait for the flake to build.

Options: true, false

CapabilitiesExpand a row to see its full configuration. See the full spec for the complete descriptor.
TypeRequiredDescription
com.docker.sandbox/network-policy@1Required—
com.docker.sandbox/lifecycle@1Required—
com.docker.sandbox/agent-context@1Optional—
com.docker.sandbox/agent-context@2Optional—

Apply this mixin to a sandbox

sbx run <agent> --kit matthisk/nix-direnv-kit:latest

Make sure you have docker sbx installed

Run the following command to install sbx on your machine.

macOS
brew install docker/tap/sbx
Windows
winget install Docker.sbx
Learn more about docker sbx⁠
No overview available
This repository doesn't have an overview