From 3f729d9e943a243b74bd16de794dd46fdec29922 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sat, 10 Oct 2026 09:02:45 +0200 Subject: 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 --- .envrc | 3 +++ AGENTS.md | 1 + 2 files changed, 4 insertions(+) create mode 100644 .envrc 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 `. * 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 -- cgit v1.3.1