From 6d2f5f84c29bf8470dff77f86f3018acea4e9e98 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 3 Nov 2025 17:42:48 +0000 Subject: forge: Serve project websites under the forge web domain. --- guix/forge/forge.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/forge/forge.scm b/guix/forge/forge.scm index 6a0ec6c..20d534c 100644 --- a/guix/forge/forge.scm +++ b/guix/forge/forge.scm @@ -490,7 +490,22 @@ that were built." forge configuration @var{config}." (cons (nginx-server-configuration (server-name (list (forge-configuration-web-domain config))) - (root (forge-configuration-web-root config))) + (root (forge-configuration-web-root config)) + (locations + ;; Configure location blocks for projects that have a website + ;; directory but no web domain. + (filter-map (lambda (project) + (match-record project + (name web-domain website-directory) + (and (not web-domain) + website-directory + (nginx-location-configuration + (uri (string-append "/" name "/")) + (body + (list (string-append "alias " + (file-name-as-directory website-directory) + ";"))))))) + (forge-configuration-projects config)))) ;; Configure nginx server blocks for projects that have a web domain and ;; a website directory. (filter-map (match-record-lambda -- cgit 1.4.1