blob: 46e70f3e43aa45c043e2a7506e9108e3c7aadee3 (
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
28
29
30
31
32
33
34
35
|
{
config,
lib,
pkgs,
...
}:
let
virtualHost = "${config.networking.hostName}.aristote.mesh";
in
{
services.cgit.default = {
enable = true;
scanPath = "/srv/git";
gitHttpBackend.enable = false;
nginx = {
inherit virtualHost;
location = "/git/";
};
settings = {
head-include = "${./head.html}";
root-title = "repositories";
root-desc = "by Quentin Aristote";
root-readme = "${./about.html}";
source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
clone-prefix = "https://git.aristote.fr";
section-from-path = 1;
enable-index-owner = 0;
};
};
services.nginx.virtualHosts."${virtualHost}".locations."= /git/cgit.css".alias =
lib.mkForce ./cgit.css;
# give access to the repos
users.users.cgit.extraGroups = [ "git" ];
}
|