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

@ -1,4 +0,0 @@
python parser/md.py
python generate.py
cd dist
python -m http.server 8000

View file

@ -1,4 +1,4 @@
markdown>=3.8.0 markdown==3.8.0
python-markdown-math>=0.9 python-markdown-math==0.9
pyyaml>=6.0.2 pyyaml==6.0.2
jinja2>=3.1.6 jinja2==3.1.6

View file

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