diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-06-19 22:48:48 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-06-19 22:48:48 +0200 |
commit | dec6902f7cdac02ccf2eb28885bc42a5775a80b2 (patch) | |
tree | 3c56e9fedb3512fca72005d4ff1d108e6cc76250 | |
parent | d147b6c5263b91a6af8400f72bd85b0d62d9a8f5 (diff) | |
download | nixos-dec6902f7cdac02ccf2eb28885bc42a5775a80b2.tar nixos-dec6902f7cdac02ccf2eb28885bc42a5775a80b2.tar.gz nixos-dec6902f7cdac02ccf2eb28885bc42a5775a80b2.tar.bz2 nixos-dec6902f7cdac02ccf2eb28885bc42a5775a80b2.tar.xz nixos-dec6902f7cdac02ccf2eb28885bc42a5775a80b2.zip |
git.rheperire.org
-rw-r--r-- | custom/ymir-nginx.nix | 23 | ||||
-rw-r--r-- | ymir.nix | 70 |
2 files changed, 82 insertions, 11 deletions
diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 94e6f1ed..a1de81c3 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix | |||
@@ -132,7 +132,28 @@ in { | |||
132 | 132 | ||
133 | location @cgit { | 133 | location @cgit { |
134 | include ${uwsgi_params}; | 134 | include ${uwsgi_params}; |
135 | uwsgi_pass unix:/tmp/cgit.sock; | 135 | uwsgi_pass unix:/tmp/git.yggdrasil.li.sock; |
136 | uwsgi_modifier1 9; | ||
137 | } | ||
138 | } | ||
139 | |||
140 | server { | ||
141 | listen *:80; | ||
142 | listen *:443 ssl; | ||
143 | listen [::]:80; | ||
144 | listen [::]:443 ssl; | ||
145 | server_name ~^(.*\.)?git\.rheperire\.org$; | ||
146 | |||
147 | root ${pkgs.cgit}/cgit; | ||
148 | |||
149 | try_files $uri @cgit; | ||
150 | |||
151 | include ${favicon}; | ||
152 | include ${acme}; | ||
153 | |||
154 | location @cgit { | ||
155 | include ${uwsgi_params}; | ||
156 | uwsgi_pass unix:/tmp/git.rheperire.org.sock; | ||
136 | uwsgi_modifier1 9; | 157 | uwsgi_modifier1 9; |
137 | } | 158 | } |
138 | } | 159 | } |
@@ -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; |