Changes
1 changed files (+32/-32)
-
-
@@ -172,38 +172,38 @@user = "caddy"; group = "caddy"; }; environment.etc.cgitrc.text = lib.generators.toINIWithGlobalSection { } { globalSection = { root-title = "DO NOT L∃∀N"; root-desc = "Department of Provably Bad Code"; clone-prefix = "https://git.unnamed.website"; default-page = "about"; # Idle column uses master branch # https://lists.zx2c4.com/pipermail/cgit/2020-August/004514.html # Can manually set the time using # touch -m --date=@$(git log -1 --format=%ct) $(git show-ref | awk '{print $2}') # https://ch1p.io/cgit-idle-time/ repository-sort = "age"; # The cache reduces load and most importantly, prevents cgit from scanning the repos on disk every time # To clear cache, restart fcgiwrap-caddy.service cache-size = 64; # No spam plz noplainemail = 1; # The default md2html filter uses the super slow python-markdown, so instead use MD4C about-filter = pkgs.writeShellScript "md2html" '' ${pkgs.md4c}/bin/md2html --github | sed 's/<a href="\([^/]*\)">/<a href="tree\/\1">/g' ''; readme = ":README.md"; # To make repo unlisted, add hide=1 to its cgitrc section-from-path = 1; # scan-path MUST be last! # https://wiki.archlinux.org/title/Cgit#readme_files_are_not_found,_about_tab_not_shown # toINIWithGlobalSection sorts the keys, but thankfully scan-path ends up near the end scan-path = "/srv/git"; # Tip: Generate a GitHub-style contrib graph with # https://github.com/tos-kamiya/git-contrib-graph }; }; environment.etc.cgitrc.text = (lib.generators.toINIWithGlobalSection { } { globalSection = { root-title = "DO NOT L∃∀N"; root-desc = "Department of Provably Bad Code"; clone-prefix = "https://git.unnamed.website"; default-page = "about"; # Idle column uses master branch # https://lists.zx2c4.com/pipermail/cgit/2020-August/004514.html # Can manually set the time using # touch -m --date=@$(git log -1 --format=%ct) $(git show-ref | awk '{print $2}') # https://ch1p.io/cgit-idle-time/ repository-sort = "age"; # The cache reduces load and most importantly, prevents cgit from scanning the repos on disk every time # To clear cache, restart fcgiwrap-caddy.service cache-size = 64; # No spam plz noplainemail = 1; # The default md2html filter uses the super slow python-markdown, so instead use MD4C about-filter = pkgs.writeShellScript "md2html" '' ${pkgs.md4c}/bin/md2html --github | sed 's/<a href="\([^/]*\)">/<a href="tree\/\1">/g' ''; # Syntax highlighting source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py"; readme = ":README.md"; # To make repo unlisted, add hide=1 to its cgitrc section-from-path = 1; }; }) # scan-path MUST be last! # https://wiki.archlinux.org/title/Cgit#readme_files_are_not_found,_about_tab_not_shown + "scan-path=/srv/git"; # The cgit cache dir must be writable by dynamic user running cgit # Easy solution is to use /var/tmp as the cache dir # I couldn't figure out how to set cache-root for cgit, so instead symlink it
-