From c5bef25cb936ff9de1a1712da2c1df1659ff2464 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 15 Nov 2025 01:08:47 +0100 Subject: add cgit about-filter for adoc and md --- README.adoc | 8 ++++---- modules/git/default.nix | 34 ++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/README.adoc b/README.adoc index d6ce7fa..49264c2 100644 --- a/README.adoc +++ b/README.adoc @@ -1,8 +1,8 @@ -= vapor.systems nixos configuration +== vapor.systems nixos configuration All our server configuration managed by a git flake. -== Structure +=== Structure * lib: library functions * machines: hardware definitions for each server @@ -11,7 +11,7 @@ All our server configuration managed by a git flake. * secrets: submodule for sensitive information * flake.nix: main entrypoint -== Servers +=== Servers * ettves: main server for webshit & games * phaenn: storage server for media @@ -20,7 +20,7 @@ All our server configuration managed by a git flake. * nyc01.ns * sin01.ns -== Usage +=== Usage This project uses a slightly modified version of https://github.com/maxaudron/nixinate[nixinate] to provide easy to use deployment scripts. You can show what is available to run with `+nix flake diff --git a/modules/git/default.nix b/modules/git/default.nix index e30e529..0827735 100644 --- a/modules/git/default.nix +++ b/modules/git/default.nix @@ -14,12 +14,7 @@ settings = { css = "https://cdn.vapor.systems/cgit/cgit.css"; - head-include = "${pkgs.writeText "cgit-head.html" '' - - ''}"; + root-title = "vapor.systems git repositories"; enable-follow-links = true; enable-commit-graph = true; @@ -36,12 +31,34 @@ readme = "README.adoc"; source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py"; - # about-filter = "${pkgs.asciidoctor}" + about-filter = "${pkgs.writeShellScript "cgit-about-filter" '' + ${pkgs.asciidoctor}/bin/asciidoctor -b html5 -e -o - - + ''}"; }; + + package = pkgs.cgit.overrideAttrs ( + final: prev: + let + rev = "09d24d7cd0b7e85633f2f43808b12871bb209d69"; + in + { + version = "1.2.3-2025-11-15"; + + src = pkgs.fetchurl { + url = "https://git.zx2c4.com/cgit/snapshot/${prev.pname}-${rev}.tar.xz"; + hash = "sha256-gfgjAXnWRqVCP+4cmYOVdB/3OFOLJl2WBOc3bFVDsjw="; + }; + + gitSrc = pkgs.fetchurl { + url = "mirror://kernel/software/scm/git/git-2.46.0.tar.xz"; + hash = "sha256-fxI0YqKLfKPr4mB0hfcWhVTCsQ38FVx+xGMAZmrCf5U="; + }; + } + ); in { audron = { - inherit settings; + inherit settings package; enable = true; repos = { "dotfiles.git" = { @@ -54,6 +71,7 @@ }; "vapor-systems" = { + inherit package; enable = true; scanPath = "/var/lib/git"; -- cgit v1.2.3