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-18 07:26:19 +0200
commit4e5ddc8e1f0aaf5206fe364919e61ee047b1fd10 (patch)
tree1aa0d230af66aaff35d4f59bc9d4a90fd5968e5d
parent93b196f86886ec0516f4e4146313cafcd8e817bf (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.md3
2 files changed, 6 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 53c787f..b5b06c6 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -34,6 +34,9 @@ To get the store path to a pin, use the `get-path` npins subcommand:
npins -d nixos/npins get-path <name>
+For the Nixpkgs pin store paths `.envrc` defines the env vars `$nixos`,
+`$nixos_small` and `$nixos_unstable`.
+
Build a package under `nixos/profiles/<profile>/pkgs/`
(both `<package>.nix` and `<package>/package.nix` map to `<package>`):