summaryrefslogtreecommitdiff
path: root/hosts/kay/modules/cgit.nix
blob: e4bed684c1324613b7cc4c142def2385d7671b82 (plain) (blame)
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
28
{ config, pkgs, ... }:

let
  domain = config.userdata.domain;
  user = config.userdata.user;
in
{
  services = {
    nginx.virtualHosts."git.${domain}" = {
      forceSSL = true;
      enableACME = true;
    };
    cgit."git.${domain}" = {
      enable = true;
      nginx.virtualHost = "git.${domain}";
      scanPath = "/var/lib/git";
      settings = {
        project-list = "/var/lib/git/project.list";
        remove-suffix = 1;
        enable-commit-graph = 1;
        root-title = "${user}'s git server";
        root-desc = "how do i learn github anon";
        source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
        clone-url = "https://git.${domain}/$CGIT_REPO_URL";
      };
    };
  };
}