summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2026-01-29 15:17:45 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2026-01-29 19:47:28 +0100
commit317fb8c83cf4c1006fc9a958cc904dd7e35d40f3 (patch)
tree7907142f917c5449615fe774cb6d9d1fc3c02a40 /config
parent0dd6477adc1eb799c77b4194e1d4cb2a59f0ccd6 (diff)
cgit: add syntax highlighting
Diffstat (limited to 'config')
-rw-r--r--config/services/git/web/cgit.css2
-rw-r--r--config/services/git/web/default.nix20
2 files changed, 13 insertions, 9 deletions
diff --git a/config/services/git/web/cgit.css b/config/services/git/web/cgit.css
index 00b8a1e..fde27cc 100644
--- a/config/services/git/web/cgit.css
+++ b/config/services/git/web/cgit.css
@@ -935,4 +935,4 @@ div#cgit table.ssdiff td.space div {
div#cgit div.cgit-panel {
float: left;
}
- } \ No newline at end of file
+} \ No newline at end of file
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;
}