summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/cgit.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/services/cgit.nix b/services/cgit.nix
index 116a3de..73bfbe4 100644
--- a/services/cgit.nix
+++ b/services/cgit.nix
@@ -5,7 +5,19 @@ let
inherit (pkgs) dockerTools;
inherit (auxiliaryPkgs) common;
- cgit = pkgs.cgit-pink;
+ # https://pygments.org/styles/
+ cgitDefaultStyle = "pastie";
+ cgitNewStyle = "rrt";
+
+ cgit = pkgs.cgit-pink.overrideAttrs (attrs: {
+ postPatch = attrs.postPatch + ''
+ substituteInPlace filters/syntax-highlighting.py filters/html-converters/md2html \
+ --replace-fail '${cgitDefaultStyle}' '${cgitNewStyle}'
+
+ # remove all lines with color, to use the default ones
+ sed -i -n "/color/!p" filters/html-converters/md2html
+ '';
+ });
cgitLocalPort = 3792;
cgitDir = "/srv/cgit";