aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2020-10-30 11:12:28 +0100
committerRobert Hensing <robert@roberthensing.nl>2020-10-30 11:12:28 +0100
commitd4c5d8d32a4bc5b3eaa63add23dca9d755dc5a74 (patch)
tree9d92000b281f837f011cd6914a837da4dfefa719 /doc
parentb809c48ebba7b628a5fb0a0e284cf7068589d479 (diff)
nix-shell.md: Extend shellHook example
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/src/command-ref/nix-shell.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/manual/src/command-ref/nix-shell.md b/doc/manual/src/command-ref/nix-shell.md
index 8c77923d0..88b675e71 100644
--- a/doc/manual/src/command-ref/nix-shell.md
+++ b/doc/manual/src/command-ref/nix-shell.md
@@ -41,10 +41,12 @@ to `nix-shell`. For example, the derivation attribute
shellHook =
''
echo "Hello shell"
+ export SOME_API_TOKEN="$(cat ~/.config/some-app/api-token)"
'';
```
-will cause `nix-shell` to print `Hello shell`.
+will cause `nix-shell` to print `Hello shell` and set the `SOME_API_TOKEN`
+environment variable to a user-configured value.
# Options