From 5d8988b1a242cb1ef006313cb0aa3756e629a422 Mon Sep 17 00:00:00 2001 From: Adrian Duke Date: Wed, 22 Apr 2026 17:18:13 +0100 Subject: [PATCH] CONTRIBUTING/HACKING: Add note on direnv Add a note on the use of `direnv`, and the availability of the `.envrc.sample` file. --- CONTRIBUTING.md | 8 ++++++++ HACKING.md | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eb314a21..a6103ebe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -286,4 +286,12 @@ When it comes to formatting, here's a model git commit message[1]: --- +### Using `direnv` + +The team maintains an `.envrc.sample` file (see [direnv](https://direnv.net/)), that contributors may choose to copy or symlink to their local `.envrc` file. +This provides some basic tooling and setup that is common to the team. +For example, if `nix` is installed, the `flake.nix` and `rust-toolchain.toml` files are automatically watched for updates. + +_NOTE: It is suggested you do not use `source_env .envrc.sample` in your `.envrc` as [`direnv`'s security checks](https://direnv.net/man/direnv-stdlib.1.html#codesourceenv-ltfileordirpathgtcode) are not triggered when changes are made to `.envrc.sample`._ + [1]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html diff --git a/HACKING.md b/HACKING.md index 7f8910b0..7a4e0963 100644 --- a/HACKING.md +++ b/HACKING.md @@ -185,3 +185,10 @@ OpenSSH tools to interact with them, eg. `ssh-add`. Your Radicle secret key is protected with a passphrase (See: `$RAD_PASSPHRASE`). +## Using `direnv` + +The team maintains an `.envrc.sample` file (see [direnv](https://direnv.net/)), that contributors may choose to copy or symlink to their local `.envrc` file. +This provides some basic tooling and setup that is common to the team. +For example, if `nix` is installed, the `flake.nix` and `rust-toolchain.toml` files are automatically watched for updates. + +_NOTE: It is suggested you do not use `source_env .envrc.sample` in your `.envrc` as [`direnv`'s security checks](https://direnv.net/man/direnv-stdlib.1.html#codesourceenv-ltfileordirpathgtcode) are not triggered when changes are made to `.envrc.sample`._