Update nix config

This commit is contained in:
Yan Lin 2025-05-16 09:20:49 +02:00
parent ac07362535
commit 329914e70b
3 changed files with 15 additions and 11 deletions

View file

@ -8,10 +8,18 @@ pkgs.mkShell {
];
shellHook = ''
if [ ! -d .venv ]; then
python -m venv .venv
export PIP_REQUIRE_VIRTUALENV=1
export VENV_PATH=$HOME/venv/homepage
if [ ! -d $VENV_PATH ]; then
python -m venv $VENV_PATH
fi
source .venv/bin/activate
source $VENV_PATH/bin/activate
pip install -r requirements.txt
python parser/md.py
python generate.py
cd dist
python -m http.server 8000
'';
}