From a96992b3e1e9e8d1a877b02ddf1b475d04aad32a Mon Sep 17 00:00:00 2001 From: V Date: Mon, 6 Jun 2022 11:43:02 +0200 Subject: fleet/hosts/trieste/cgit: switch implementation to cgit-pink cgit-pink purports to be actively maintained, unlike its upstream. Change-Id: I4d76324ddb24f5fd3e53aeed6fa6ed17713ee15d --- fleet/hosts/trieste/cgit/default.nix | 10 ++++++---- 1 file 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 -- cgit 1.4.1