From 73b35195681f8367e27ebf2a239c2d4790fb2304 Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Wed, 19 Oct 2022 11:34:31 +0200 Subject: services: gitolite: Add local-code configuration option. * gnu/services/version-control.scm (gitolite-rc-file): Add local-code field. (gitolite-rc-file-compiler): Serialize the field. * doc/guix.texi: Document it. Signed-off-by: Christopher Baines --- gnu/services/version-control.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index cd8763f5ea..b6b78e504e 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -54,6 +54,7 @@ gitolite-rc-file + gitolite-rc-file-local-code gitolite-rc-file-umask gitolite-rc-file-unsafe-pattern gitolite-rc-file-git-config-keys @@ -242,6 +243,8 @@ access to exported repositories under @file{/srv/git}." gitolite-rc-file? (umask gitolite-rc-file-umask (default #o0077)) + (local-code gitolite-rc-file-local-code + (default "$rc{GL_ADMIN_BASE}/local")) (unsafe-pattern gitolite-rc-file-unsafe-pattern (default #f)) (git-config-keys gitolite-rc-file-git-config-keys @@ -263,11 +266,14 @@ access to exported repositories under @file{/srv/git}." (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) (match file - (($ umask unsafe-pattern git-config-keys roles enable) + (($ umask local-code unsafe-pattern git-config-keys roles enable) (apply text-file* "gitolite.rc" `("%RC = (\n" " UMASK => " ,(format #f "~4,'0o" umask) ",\n" " GIT_CONFIG_KEYS => '" ,git-config-keys "',\n" + ,(if local-code + (simple-format #f " LOCAL_CODE => \"~A\",\n" local-code) + "") " ROLES => {\n" ,@(map (match-lambda ((role . value) -- cgit v1.2.3