From f34f6643922b420a1a42797d2ede2f870b09cc70 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Mon, 28 Jul 2025 19:06:00 +0200 Subject: [PATCH] Use home directory for virtualenv --- shell.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index 2d3db8a..4d5a60e 100644 --- a/shell.nix +++ b/shell.nix @@ -7,13 +7,17 @@ pkgs.mkShell { ]; shellHook = let + venvPath = "$HOME/.venv/homepage"; remoteHost = "personal-vps"; in '' + # Set uv to use specific virtual environment path + export UV_PROJECT_ENVIRONMENT=${venvPath} + # Install dependencies with uv uv sync ${if dev then "--group dev" else ""} # Activate the virtual environment - source .venv/bin/activate + source ${venvPath}/bin/activate python generate.py