From 8415fbef97b35131f75dc93ad9bd61fd09487a52 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Wed, 29 Nov 2023 20:44:19 +0100 Subject: Serve cgit on git.twilken.net --- tw/system/lud.scm | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tw/system/lud.scm b/tw/system/lud.scm index 9a07fb0d..2b2b08e1 100644 --- a/tw/system/lud.scm +++ b/tw/system/lud.scm @@ -10,11 +10,12 @@ #:use-module (tw services matrix) #:use-module (tw services media) #:use-module (tw services secrets) + #:use-module (tw services web) #:use-module (tw system)) (use-package-modules admin bash certs databases linux man php python rsync shells tls tor video) -(use-service-modules certbot databases file-sharing mcron monitoring +(use-service-modules certbot cgit databases file-sharing mcron monitoring networking pm ssh syncthing version-control vpn web) (define efi-system-partition ; /dev/sda1 @@ -86,6 +87,30 @@ ;; git://lud.wg/~user/repo.git => /home/user/src/repo.git (user-path "src"))) + (service cgit-service-type + (cgit-configuration + (branch-sort "age") + ;; (root-readme "") ; TODO + ;; (root-title "") ; TODO + (repository-directory "/srv/git") + (remove-suffix? #t) ; remove trailing .git in name and URL + (clone-prefix '("https://git.twilken.net/" + "git@git.twilken.net:")) + (enable-http-clone? #t) ; avoid having to run git-daemon as well + (noplainemail? #t) ; hide email addresses in web interface + (nginx + (list (nginx-server-configuration + (inherit %cgit-configuration-nginx) + (server-name '("git.twilken.net")) + (listen '("443 ssl http2")) + (ssl-certificate "/etc/letsencrypt/live/git.twilken.net/fullchain.pem") + (ssl-certificate-key "/etc/letsencrypt/live/git.twilken.net/privkey.pem")))))) + + (simple-service 'cgit-certificate certbot-service-type + (list (certificate-configuration + (domains '("git.twilken.net")) + (deploy-hook %nginx-cert-deploy-hook)))) + ;; Transmission (torrents) (service transmission-daemon-service-type (transmission-daemon-configuration -- cgit v1.2.3