From 31b5ab43edea0f22fd8fda6aa95ede0a3af4b425 Mon Sep 17 00:00:00 2001 From: James McCorrie Date: Thu, 12 Mar 2026 10:40:22 +0000 Subject: [PATCH] fix: set UV_PYTHON in .envrc for NixOS direnv users On NixOS, uv resolves the Python interpreter via PATH even when VIRTUAL_ENV is set, falling back to the immutable Nix store Python which rejects writes. Setting UV_PYTHON explicitly in .envrc forces uv to use the venv interpreter for all commands. Signed-off-by: James McCorrie --- .envrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.envrc b/.envrc index 1e385a24..642e425d 100644 --- a/.envrc +++ b/.envrc @@ -11,3 +11,7 @@ use flake # Activate the project venv . .venv/bin/activate + +# Tell UV to use the venv python, without this it will use system python on +# NixOS. Which means `uv pip list` will not work. +export UV_PYTHON=.venv/bin/python