summaryrefslogtreecommitdiff
path: root/tw
diff options
context:
space:
mode:
authorTimo Wilken2023-11-29 20:44:19 +0100
committerTimo Wilken2023-11-29 20:44:19 +0100
commit8415fbef97b35131f75dc93ad9bd61fd09487a52 (patch)
treece38eea76e74da773bb690e4763ceab92f492de0 /tw
parent813cefc3cc2b17d752bf6ea7803ce036e562a286 (diff)
Serve cgit on git.twilken.net
Diffstat (limited to 'tw')
-rw-r--r--tw/system/lud.scm27
1 files changed, 26 insertions, 1 deletions
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