@@ -28696,6 +28696,9 @@ Web Services
Extra content for the @code{http} block. Should be string or a string
valued G-expression.
+@item @code{extra-content-ahead} (default: @code{""})
+Like extra-content, but it's located at upstream blocks and server blocks.
+
@end table
@end deffn
@@ -101,6 +101,7 @@ (define-module (gnu services web)
nginx-configuration-server-names-hash-bucket-max-size
nginx-configuration-modules
nginx-configuration-global-directives
+ nginx-configuration-extra-content-ahead
nginx-configuration-extra-content
nginx-configuration-file
@@ -575,6 +576,8 @@ (define-record-type* <nginx-configuration>
(default #f))
(lua-package-cpath nginx-lua-package-cpath ;list of file-like
(default #f))
+ (extra-content-ahead nginx-configuration-extra-content-ahead
+ (default ""))
(extra-content nginx-configuration-extra-content
(default ""))
(file nginx-configuration-file ;#f | string | file-like
@@ -691,6 +694,7 @@ (define (default-nginx-config config)
global-directives
lua-package-path
lua-package-cpath
+ extra-content-ahead
extra-content)
(apply mixed-text-file "nginx.conf"
(flatten
@@ -734,6 +738,8 @@ (define (default-nginx-config config)
";\n")
"")
"\n"
+ extra-content-ahead
+ "\n"
(map emit-nginx-upstream-config upstream-blocks)
(map emit-nginx-server-config server-blocks)
extra-content
From: tiantian <typ22@foxmail.com> Solve problems like log_format. * gnu/services/web.scm (nginx-configuration-extra-content-ahead): New procedure. (nginx-configuration): Add the extra-content-ahead field. (default-nginx-config): Include the extra-content-ahead. * doc/guix.texi: Add document about extra-content-ahead. --- doc/guix.texi | 3 +++ gnu/services/web.scm | 6 ++++++ 2 files changed, 9 insertions(+)