summaryrefslogtreecommitdiff
path: root/config/services/git/web/default.nix
blob: f5c8251a61db1c0e248010d9d6c9c2c80fef019a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ config, lib, ... }:
let
  virtualHost = "${config.networking.hostName}.aristote.mesh";
in
{
  services.cgit.default = {
    enable = true;
    scanPath = "/srv/git";
    gitHttpBackend.enable = false;
    nginx = {
      inherit virtualHost;
      location = "/git/";
    };
    extraConfig = ''
      root-title=repositories
      root-desc=by Quentin Aristote
      head-include=${./head.html}
    '';
  };
  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;
}