[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/09: services: nginx: Print extra-content before the server-blocks.
From: |
guix-commits |
Subject: |
05/09: services: nginx: Print extra-content before the server-blocks. |
Date: |
Wed, 20 Nov 2024 17:58:47 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 123dcaefe921d390a5670b39ef92ff614b99ac11
Author: Tomas Volf <~@wolfsden.cz>
AuthorDate: Sun Oct 6 17:40:14 2024 +0200
services: nginx: Print extra-content before the server-blocks.
The configuration file is processed sequentially, which meant that there was
no way to set for example log format shared between the server-blocks,
because
the final configuration file would have this order:
...
http {
...
server {
}
...
$extra-content
}
Moving the extra-content before the serialization of server-blocks resolves
this.
* gnu/services/web.scm (default-nginx-config): Move extra-content before
server-blocks.
Change-Id: Ie8286a533dfed575abc58a0f4800706b3ad6adc2
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/services/web.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 4cf7c68997..6f77efaaf2 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -771,10 +771,7 @@ of index files."
(number->string server-names-hash-bucket-max-size)
";\n")
"")
- "\n"
- (map emit-nginx-upstream-config upstream-blocks)
- (map emit-nginx-server-config server-blocks)
- (match extra-content
+ (match extra-content
((? list? extra-content)
(map (lambda (line)
`(" " ,line "\n"))
@@ -782,7 +779,10 @@ of index files."
;; XXX: For compatibility strings and gexp's are inserted
;; directly.
(_ extra-content))
- "\n}\n"))))
+ "\n"
+ (map emit-nginx-upstream-config upstream-blocks)
+ (map emit-nginx-server-config server-blocks)
+ "}\n"))))
(define %nginx-accounts
(list (user-group (name "nginx") (system? #t))
- branch master updated (d5eab53a72 -> b2bd56f8fe), guix-commits, 2024/11/20
- 04/09: gnu: ocaml-sedlex: Update to 3.2., guix-commits, 2024/11/20
- 02/09: gnu: ocaml-sedlex: Use G-Expressions., guix-commits, 2024/11/20
- 06/09: services: nginx-upstream-configuration: Allow file-like objects, guix-commits, 2024/11/20
- 08/09: gnu: Bump zstd to version 1.5.6, guix-commits, 2024/11/20
- 05/09: services: nginx: Print extra-content before the server-blocks.,
guix-commits <=
- 03/09: gnu: ocaml-sedlex: Use ucd package., guix-commits, 2024/11/20
- 07/09: gnu: services: power-profiles-daemon: Beautify service., guix-commits, 2024/11/20
- 01/09: home: services: Use %user-log-dir as the log directory for all services., guix-commits, 2024/11/20
- 09/09: gnu: Bump pzstd to version 1.5.6, guix-commits, 2024/11/20