summaryrefslogtreecommitdiff
path: root/ymir.nix
diff options
context:
space:
mode:
Diffstat (limited to 'ymir.nix')
-rw-r--r--ymir.nix70
1 files changed, 60 insertions, 10 deletions
diff --git a/ymir.nix b/ymir.nix
index 8b6298fc..6448c568 100644
--- a/ymir.nix
+++ b/ymir.nix
@@ -295,20 +295,35 @@ in rec {
295 enable = true; 295 enable = true;
296 plugins = ["python3" "cgi"]; 296 plugins = ["python3" "cgi"];
297 instance = { 297 instance = {
298 type = "normal"; 298 type = "emperor";
299 processes = 1; 299 vassals = {
300 threads = 8; 300 "git.yggdrasil.li" = {
301 chdir = "${pkgs.cgit}/cgit"; 301 processes = 1;
302 cgi = "${pkgs.cgit}/cgit/cgit.cgi"; 302 threads = 8;
303 socket = "/tmp/cgit.sock"; 303 chdir = "${pkgs.cgit}/cgit";
304 chmod-socket = "660"; 304 cgi = "${pkgs.cgit}/cgit/cgit.cgi";
305 chown-socket = "uwsgi:nginx"; 305 env = "CGIT_CONFIG=/etc/cgit/git.yggdrasil.li";
306 socket = "/tmp/git.yggdrasil.li.sock";
307 chmod-socket = "660";
308 chown-socket = "uwsgi:nginx";
309 };
310 "git.rheperire.org" = {
311 processes = 1;
312 threads = 8;
313 chdir = "${pkgs.cgit}/cgit";
314 cgi = "${pkgs.cgit}/cgit/cgit.cgi";
315 env = "CGIT_CONFIG=/etc/cgit/git.rheperire.org";
316 socket = "/tmp/git.rheperire.org.sock";
317 chmod-socket = "660";
318 chown-socket = "uwsgi:nginx";
319 };
320 };
306 }; 321 };
307 }; 322 };
308 323
309 users.extraUsers."uwsgi".extraGroups = ["git"]; 324 users.extraUsers."uwsgi".extraGroups = ["git"];
310 325
311 environment.etc."cgitrc" = { 326 environment.etc."cgit/git.yggdrasil.li" = {
312 enable = true; 327 enable = true;
313 text = '' 328 text = ''
314 robots=noindex, nofollow 329 robots=noindex, nofollow
@@ -335,7 +350,7 @@ in rec {
335 readme=:readme.txt 350 readme=:readme.txt
336 readme=:readme 351 readme=:readme
337 352
338 clone-prefix=git://git.yggdrasil.li http://git.yggdrasil.li 353 clone-prefix=git://git.yggdrasil.li https://git.yggdrasil.li
339 354
340 strict-export=git-daemon-export-ok 355 strict-export=git-daemon-export-ok
341 project-list=/srv/git/projects.list 356 project-list=/srv/git/projects.list
@@ -343,6 +358,41 @@ in rec {
343 scan-path=/srv/git/repositories 358 scan-path=/srv/git/repositories
344 ''; 359 '';
345 }; 360 };
361 environment.etc."cgit/git.rheperire.org" = {
362 enable = true;
363 text = ''
364 robots=noindex, nofollow
365 virtual-root=/
366 enable-git-config=1
367 remove-suffix=1
368
369 root-title=git.rheperire.org
370 root-desc=
371
372 enable-http-clone=1
373
374 enable-commit-graph=1
375 snapshots=tar tar.gz tar.bz2 tar.xz zip
376 side-by-side-diffs=1
377
378 source-filter=${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py
379 about-filter=${pkgs.cgit}/lib/cgit/filters/about-formatting.sh
380
381 readme=:README.md
382 readme=:README.txt
383 readme=:README
384 readme=:readme.md
385 readme=:readme.txt
386 readme=:readme
387
388 clone-prefix=git://git.rheperire.org https://git.rheperire.org
389
390 strict-export=git-daemon-export-ok
391 project-list=${pkgs.writeText "project-list" "rheperire.git"}
392 section-from-path=2
393 scan-path=/srv/git/repositories
394 '';
395 };
346 396
347 services.gitolite = { 397 services.gitolite = {
348 enable = true; 398 enable = true;