website

Portfolio website
git clone https://willem.vanzwol.com/git/website/repo.bundle
Log | Files | Refs | README | LICENSE

commit b1c8e0c84c5b515318002ce1636fef789c708ecf
parent ea54c861164146ad2d08e6899d4654833c90e1c7
Author: Willem Van Zwol <willem@vanzwol.com>
Date:   Tue,  2 Jun 2026 13:50:51 -0700

Fixed flake and generates stagit for other repos now

Previously linking the stylesheet and favicon was fine looking at the
local file on my machine, but trying to serve the directory it's
unfetchable, the files instead needed to be copied over.

The git/ directory now includes other projects generated from cloned
repos in ../pub_repos/

Diffstat:
Mflake.nix | 42+++++++++++++++++++++++++++++-------------
1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/flake.nix b/flake.nix @@ -15,28 +15,44 @@ text = '' set -euo pipefail -REPO="$(pwd)" -OUT="$REPO/git/website" +BASE="$(pwd)" +OUT="$BASE/git" +REPOS_DIR="$BASE/../pub_repos" rm -rf "$OUT" mkdir -p "$OUT" -tmp="$(mktemp -d)" +generate_repo () { + repo_path="$1" + repo_name="$(basename "$repo_path")" -# run inside output dir (important) -cd "$tmp" + work="$(mktemp -d)" + trap 'rm -rf "$work"' RETURN -stagit -c cache "$REPO" + mkdir -p "$work" + cd "$work" -cp -r ./* "$OUT" + stagit -c cache "$repo_path" -ln -sf "${pkgs.stagit}/share/doc/stagit/style.css" "$OUT/style.css" -ln -sf "${pkgs.stagit}/share/doc/stagit/logo.png" "$OUT/logo.png" -ln -sf "${pkgs.stagit}/share/doc/stagit/favicon.png" "$OUT/favicon.png" + dest="$OUT/$repo_name" + mkdir -p "$dest" -echo "generated: $OUT" - ''; - }; + cp -r ./* "$dest" + + cp -f "${pkgs.stagit}/share/doc/stagit/style.css" "$dest/style.css" + cp -f "${pkgs.stagit}/share/doc/stagit/logo.png" "$dest/logo.png" + cp -f "${pkgs.stagit}/share/doc/stagit/favicon.png" "$dest/favicon.png" +} + +# include website repo itself as just another repo +generate_repo "$BASE" + +for repo in "$REPOS_DIR"/*; do + [ -d "$repo/.git" ] || continue + generate_repo "$repo" +done + +'';}; apps.${system}.default = { type = "app";