summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2026-02-03 22:58:54 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2026-02-03 23:20:49 +0100
commitcff6a5992c61bd833c8a1ce11303f29d43576c8d (patch)
tree659d9a7cb7b7d3444a4f986dc6e037a39460362a
parent0d107f25d5ecc868f4cb6068e2aed61dff6ccea6 (diff)
cgit: enable git http backend
-rw-r--r--config/services/git/web/default.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/config/services/git/web/default.nix b/config/services/git/web/default.nix
index 46e70f3..c9e63c3 100644
--- a/config/services/git/web/default.nix
+++ b/config/services/git/web/default.nix
@@ -6,12 +6,20 @@
}:
let
virtualHost = "${config.networking.hostName}.aristote.mesh";
+ scanPath = "/srv/git";
+ gitconfig = ''
+ [safe]
+ directory = ${scanPath}/*
+ '';
in
{
services.cgit.default = {
enable = true;
- scanPath = "/srv/git";
- gitHttpBackend.enable = false;
+ inherit scanPath;
+ gitHttpBackend = {
+ enable = true;
+ checkExportOkFiles = false;
+ };
nginx = {
inherit virtualHost;
location = "/git/";
@@ -32,4 +40,7 @@ in
# give access to the repos
users.users.cgit.extraGroups = [ "git" ];
+ ## for the http backend
+ systemd.services.fcgiwrap-cgit-default.environment.XDG_CONFIG_HOME =
+ "${pkgs.writeTextDir "git/config" gitconfig}";
}