summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorThanos Apollo <public@thanosapollo.org>2026-02-05 07:06:15 +0200
committerNguyễn Gia Phong <cnx@loang.net>2026-07-03 16:09:28 +0900
commitee71b7003d979953599937b41e65b809e4f0c1fd (patch)
treedd381fb83ac0e6852a976304427b1a14c9db880d /gnu/services
parent7e5635caf2d64c8be2706e86db23e3575ee50300 (diff)
services: git-http-nginx-location-configuration: Enable configuration of the root URI path /.
* gnu/services/version-control.scm (git-http-nginx-location-configuration): Handle the case where uri-path is "/" by not adding an extra slash prefix. * gnu/tests/version-control.scm (git-nginx-root-configuration): Generalize from %git-nginx-root-configuration to take uri-path as an argument from... (git-http-os): ...this new procedure generalized from %git-http-os to take uri-path as an argument from... (git-http-test): ...this new procedure generalized from run-git-http-test to return a system test instead of just its store value. Additionally take name, description, and uri-path arguments. (%test-git-http): Adjust accordingly. (%test-git-http-root-path): Duplicate %test-git-http with "/" instead of "/git/" as uri-path. Merges: https://codeberg.org/guix/guix/pulls/6140 Co-authored-by: Nguyễn Gia Phong <cnx@loang.net> Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/version-control.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index dba38faa460..55af92c9f5a 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -275,7 +275,12 @@ access to exported repositories under @file{/srv/git}."
275 (($ <git-http-configuration> package git-root export-all? 275 (($ <git-http-configuration> package git-root export-all?
276 uri-path fcgiwrap-socket) 276 uri-path fcgiwrap-socket)
277 (nginx-location-configuration 277 (nginx-location-configuration
278 (uri (string-append "~ /" (string-trim-both uri-path #\/) "(/.*)")) 278 (uri (string-append
279 "~ "
280 (if (string=? uri-path "/")
281 ""
282 (string-append "/" (string-trim-both uri-path #\/)))
283 "(/.*)"))
279 (body 284 (body
280 (list 285 (list
281 (list "fastcgi_pass " fcgiwrap-socket ";") 286 (list "fastcgi_pass " fcgiwrap-socket ";")