aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2026-10-10 09:02:45 +0200
committerMartin Fischer <martin@push-f.com>2026-10-10 12:06:15 +0200
commit3f729d9e943a243b74bd16de794dd46fdec29922 (patch)
tree2e9ccd900187fa84a7de529180d581d18a1e2eaa
parente8e67b65e4ef44a49e7dbdfd0be80e5933c94e4a (diff)
shell: add env vars for channel store paths
Useful for quickly looking up package and module definitions, e.g: diff {$nixos,$nixos_unstable}/pkgs/by-name/ju/jujutsu
-rw-r--r--.envrc3
-rw-r--r--AGENTS.md1
2 files changed, 4 insertions, 0 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 0000000..03fee3a
--- /dev/null
+++ b/.envrc
@@ -0,0 +1,3 @@
+export nixos="$(npins -d nixos/npins get-path nixos)"
+export nixos_small="$(npins -d nixos/npins get-path nixos-small)"
+export nixos_unstable="$(npins -d nixos/npins get-path nixos-unstable)"
diff --git a/AGENTS.md b/AGENTS.md
index f2776d5..a50e5f3 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -12,6 +12,7 @@ Dependencies are pinned with npins; host-to-channel mappings are defined in `nix
* To inspect and edit pins use the `npins` CLI: `npins -d nixos/npins <command>`.
* To get the store path to a pin, use the `get-path` npins subcommand.
+ For the Nixpkgs pin store paths `.envrc` defines the env vars `$nixos`, `$nixos_small`, `$nixos_unstable`.
* Avoid `nixos-option`.
## Documentation