summary refs log tree commit diff
path: root/fleet
diff options
context:
space:
mode:
authorV <v@unfathomable.blue>2022-06-06 11:43:02 +0200
committerV <v@unfathomable.blue>2022-06-06 11:50:15 +0200
commita96992b3e1e9e8d1a877b02ddf1b475d04aad32a (patch)
treee7b0f578e4ca9acd90f557e641bae7dea6dbc193 /fleet
parent69d03945f1027df7fc8d9d27a8be9d71712584f0 (diff)
fleet/hosts/trieste/cgit: switch implementation to cgit-pink
cgit-pink purports to be actively maintained, unlike its upstream.

Change-Id: I4d76324ddb24f5fd3e53aeed6fa6ed17713ee15d
Diffstat (limited to 'fleet')
-rw-r--r--fleet/hosts/trieste/cgit/default.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/fleet/hosts/trieste/cgit/default.nix b/fleet/hosts/trieste/cgit/default.nix
index 17f3e4f..34268e6 100644
--- a/fleet/hosts/trieste/cgit/default.nix
+++ b/fleet/hosts/trieste/cgit/default.nix
@@ -7,6 +7,8 @@
 with lib;
 
 let
+  cgit-package = pkgs.cgit-pink;
+
   cgit-webroot = pkgs.runCommand "cgit-webroot" {
     extraStyles = ''
       div#cgit table#header td.logo {
@@ -21,11 +23,11 @@ let
     '';
     passAsFile = [ "extraStyles" ];
   } ''
-    ${pkgs.minify}/bin/minify --type css --bundle ${pkgs.cgit}/cgit/cgit.css $extraStylesPath -o $out/cgit.css
+    ${pkgs.minify}/bin/minify --type css --bundle ${cgit-package}/cgit/cgit.css $extraStylesPath -o $out/cgit.css
     cp ${./un.svg} $out/un.svg  # TODO(V): remove this variant, apply padding to the Sigil using CSS
     cp ${./unicon.svg} $out/unicon.svg  # This is the same as un.svg, but without any padding
     cp ${./ripple.svg} $out/ripple.svg  # This is referenced in git.nix (as config.cgit.logo, for Ripple)
-    cp ${pkgs.cgit}/cgit/robots.txt $out
+    cp ${cgit-package}/cgit/robots.txt $out
   '';
 
   cgit-about-filter = pkgs.writeShellScript "cgit-about-filter" ''
@@ -53,7 +55,7 @@ let
     agefile=info/last-modified
     about-filter=${cgit-about-filter}
     # TODO(edef): commit-filter, for bug tracker links
-    source-filter=${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py
+    source-filter=${cgit-package}/lib/cgit/filters/syntax-highlighting.py
     # TODO(edef): add snapshots once we start releasing things
     # TODO(V): branch-sort=age?
     enable-git-config=1
@@ -68,7 +70,7 @@ let
 in {
   services.cgiserver.instances.cgit = {
     description = "Lightweight Git web interface";
-    application = "${pkgs.cgit}/cgit/cgit.cgi";
+    application = "${cgit-package}/cgit/cgit.cgi";
     environment.CGIT_CONFIG = "${cgit-config}";
     serviceConfig.SupplementaryGroups = [ "git" ];
     # TODO(V): Hardening options