flake

Francesco Saccone's Nix flake.
git clone git://git.francescosaccone.com/flake
Log | Files | Refs | README | LICENSE

commit f1de3ea1f86e9c946f17abb34a2e12c849641cb0
parent 3aa9415602caedcde67b3582c199acf84c42e106
Author: Francesco Saccone <francesco@francescosaccone.com>
Date:   Wed, 26 Mar 2025 14:26:45 +0100

fix: use -l flag instead of -c and cacheFile

This is because the script implementation had a cache file shared
by all repositories, thus with mixed commits. I could have found a
way to make it work, but I chose to just use the -l flag: it will
decrease the size of the log.html file too, which would grow as
the number of commits increases.

Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>

Diffstat:
Mhosts/server/scripts.nix | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/hosts/server/scripts.nix b/hosts/server/scripts.nix @@ -6,7 +6,6 @@ let stagit = rec { destDir = "/var/tmp/stagit"; - cacheFile = "${destDir}/.htmlcache"; reposDir = config.modules.git.directory; createIndex = '' @@ -32,7 +31,7 @@ let ${pkgs.sbase}/bin/mkdir -p ${destDir}/${name} cd ${destDir}/${name} ${pkgs.stagit}/bin/stagit \ - -c ${cacheFile} \ + -l 64 \ -u https://${config.networking.domain}/git/${name}/ \ ${reposDir}/${name} @@ -96,9 +95,8 @@ in fi done - # If is_force = 1, remove commits and cache file + # If is_force = 1, delete commits if ${pkgs.sbase}/bin/test $is_force = "1"; then - ${pkgs.sbase}/bin/rm -f ${stagit.cacheFile} ${pkgs.sbase}/bin/rm -rf ${stagit.reposDir}/${name}/commit fi