From 317fb8c83cf4c1006fc9a958cc904dd7e35d40f3 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Thu, 29 Jan 2026 15:17:45 +0100 Subject: cgit: add syntax highlighting --- config/services/git/web/default.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'config/services/git/web/default.nix') diff --git a/config/services/git/web/default.nix b/config/services/git/web/default.nix index f5c8251..6537970 100644 --- a/config/services/git/web/default.nix +++ b/config/services/git/web/default.nix @@ -1,4 +1,9 @@ -{ config, lib, ... }: +{ + config, + lib, + pkgs, + ... +}: let virtualHost = "${config.networking.hostName}.aristote.mesh"; in @@ -11,17 +16,16 @@ in inherit virtualHost; location = "/git/"; }; - extraConfig = '' - root-title=repositories - root-desc=by Quentin Aristote - head-include=${./head.html} - ''; + settings = { + head-include = "${./head.html}"; + root-title = "repositories"; + root-desc = "by Quentin Aristote"; + source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py"; + }; }; services.nginx.virtualHosts."${virtualHost}".locations."= /git/cgit.css".alias = lib.mkForce ./cgit.css; # give access to the repos users.users.cgit.extraGroups = [ "git" ]; - - systemd.services.fcgiwrap-cgit-default.personal.monitor = true; } -- cgit v1.2.3