aboutsummaryrefslogtreecommitdiff
path: root/modules/git
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2025-11-15 01:08:47 +0100
committerMax Audron <audron@cocaine.farm>2025-11-15 01:08:47 +0100
commitc5bef25cb936ff9de1a1712da2c1df1659ff2464 (patch)
tree1fda7cbefc949bea4d98387f5e71434659502310 /modules/git
parentadd git shell scripts (diff)
add cgit about-filter for adoc and md
Diffstat (limited to 'modules/git')
-rw-r--r--modules/git/default.nix34
1 files changed, 26 insertions, 8 deletions
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" ''
- <script>
- /*to prevent Firefox FOUC, this must be here*/
- let FF_FOUC_FIX;
- </script>
- ''}";
+ 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";