summary refs log tree commit diff
path: root/host/Rory-nginx/services/cgit.nix
blob: df5e8e49cee87fc89f34205fcbd731dae8e10113 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ config, pkgs, lib, ... }:

{
  
  services.cgit."main" = {
    enable = true;
    nginx.virtualHost = "cgit.rory.gay";
    package = pkgs.cgit-pink;
    scanPath = "/data/nginx/html_git";
    settings = {
      css = "/cgit.css";
      logo = "/cgit.png";
      favicon = "/favicon.ico";
      about-filter = "${pkgs.cgit-pink}/lib/cgit/filters/about-formatting.sh";
      source-filter = "${pkgs.cgit-pink}/lib/cgit/filters/syntax-highlighting.py";
      clone-url = (lib.concatStringsSep " " [
        "https://git.rory.gay/$CGIT_REPO_URL"
        "ssh://<user>@git.rory.gay:$CGIT_REPO_URL"
      ]);
      enable-log-filecount = 1;
      enable-log-linecount = 1;
      enable-git-config = 1;
#testing
      enable-blame = 1;
      enable-commit-graph = 1;
      enable-follow-links = 1;
      enable-http-clone = 1;
      enable-index-links = 1;
      enable-remote-branches = 1;
      enable-subject-links = 1;
      enable-tree-linenumbers = 1;
      max-atom-items = 100;
      max-commit-count = 250;
      max-repo-count = 500;
      snapshots = "tar.xz";
      #side-by-side-diffs = 1;


      root-title = "cgit.rory.gay";
      root-desc = "Rory&s Git Repositories";
    };
  };

services.cgit."ocp" = config.services.cgit."main" ++ {
  scanPath = "/data/nginx/html_git/.ocp";
  nginx.location = "/.ocp/";
  settings = {
    clone-url = (lib.concatStringsSep " " [
      "https://git.rory.gay/.ocp/$CGIT_REPO_URL"
      "ssh://<user>@git.rory.gay:.ocp/$CGIT_REPO_URL"
    ]);
  };
};


}