diff options
| author | Mel <einebeere@gmail.com> | 2024-12-29 15:08:38 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-12-29 15:08:38 +0100 |
| commit | 52898b111a13973517c98a7cfec67c251a168759 (patch) | |
| tree | 8752cc73e2abd14e09139eddb6c8d202052d6ec9 /services | |
| parent | cc103f09d188e30c661c938420af30f70fb5297c (diff) | |
| download | network-52898b111a13973517c98a7cfec67c251a168759.tar.zst network-52898b111a13973517c98a7cfec67c251a168759.zip | |
Make some of the cgit colors a bit more presentable :)
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'services')
| -rw-r--r-- | services/cgit.nix | 14 |
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"; |
