diff options
Diffstat (limited to 'config/services/git')
| -rw-r--r-- | config/services/git/web/default.nix | 15 |
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}"; } |
