aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/web.scm
diff options
context:
space:
mode:
authorClément Lassieur <clement@lassieur.org>2017-12-09 22:47:53 +0100
committerClément Lassieur <clement@lassieur.org>2017-12-18 12:03:14 +0100
commitb05e8ee1205bc10f2ab33045f257170d4ce1999b (patch)
tree0a36e49cf54b11c42a9b6a00dedf385807025466 /gnu/services/web.scm
parent8b223ceac4ff0781e95d69362875f87cff03f4d6 (diff)
downloadgnu-guix-b05e8ee1205bc10f2ab33045f257170d4ce1999b.tar
gnu-guix-b05e8ee1205bc10f2ab33045f257170d4ce1999b.tar.gz
services: nginx: Allow to add raw content to the server blocks.
* doc/guix.texi (Web Services): Document 'raw-content'. * gnu/services/web.scm (<nginx-server-configuration>)[raw-content]: New field. (emit-nginx-server-config): Add it.
Diffstat (limited to 'gnu/services/web.scm')
-rw-r--r--gnu/services/web.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 8a16f50de4..2371ddb6d0 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -58,6 +58,7 @@
nginx-server-configuration-ssl-certificate
nginx-server-configuration-ssl-certificate-key
nginx-server-configuration-server-tokens?
+ nginx-server-configuration-raw-content
<nginx-upstream-configuration>
nginx-upstream-configuration
@@ -152,7 +153,9 @@
(ssl-certificate-key nginx-server-configuration-ssl-certificate-key
(default #f))
(server-tokens? nginx-server-configuration-server-tokens?
- (default #f)))
+ (default #f))
+ (raw-content nginx-server-configuration-raw-content
+ (default '())))
(define-record-type* <nginx-upstream-configuration>
nginx-upstream-configuration make-nginx-upstream-configuration
@@ -232,7 +235,8 @@ of index files."
(index (nginx-server-configuration-index server))
(try-files (nginx-server-configuration-try-files server))
(server-tokens? (nginx-server-configuration-server-tokens? server))
- (locations (nginx-server-configuration-locations server)))
+ (locations (nginx-server-configuration-locations server))
+ (raw-content (nginx-server-configuration-raw-content server)))
(define-syntax-parameter <> (syntax-rules ()))
(define-syntax-rule (and/l x tail ...)
(let ((x* x))
@@ -255,6 +259,7 @@ of index files."
"\n"
(map emit-nginx-location-config locations)
"\n"
+ (map (lambda (x) (list " " x "\n")) raw-content)
" }\n")))
(define (emit-nginx-upstream-config upstream)