Skip to content

Commit

Permalink
Use stagit-index
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed Feb 1, 2025
1 parent 4a082c6 commit 58cbe30
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nixos-configurations/zucchini/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@
enable = true;
listen = "[::]:80";
root = "/var/lib/git-html";
configuration.general = {
directory-listing = true;
};
};

custom.yggdrasil.all.allowedTCPPorts = [ 80 ];
Expand All @@ -128,7 +125,9 @@
logo="''${STATE_DIRECTORY}/logo.png"
magick -size 100x100 xc:#1f3023 "$logo"
declare -a repos
while read -r repo_dir; do
repos+=("$repo_dir")
repo_name=$(basename "$repo_dir")
html_dir="''${STATE_DIRECTORY}/''${repo_name}"
mkdir -p "$html_dir"
Expand All @@ -138,6 +137,8 @@
ln -sf "$logo" "''${html_dir}/logo.png"
popd
done < <(find ${gitUser.home} -maxdepth 1 -mindepth 1 -type d)
stagit-index "''${repos[@]}" >"''${STATE_DIRECTORY}/index.html"
'';
};
}
Expand Down

0 comments on commit 58cbe30

Please sign in to comment.