all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#71586] [PATCH] services: web: Improve nginx formatting for extra-content
@ 2024-06-16  3:57 Richard Sent
  2024-06-19 17:55 ` Tomas Volf
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Sent @ 2024-06-16  3:57 UTC (permalink / raw)
  To: 71586; +Cc: Richard Sent

* gnu/services/web (default-nginx-config): When extra-content is a list, add 4
space indentation and a newline to every line. If it's a string, continue
inserting it directly. This makes the list serialization behavior more
consistent with other services.

Change-Id: Iec8614ba3cfc37292a566197e8d39b352b04846a
---
 gnu/services/web.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 406117c457..094b1e4b45 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -771,7 +771,12 @@ (define (default-nginx-config config)
            "\n"
            (map emit-nginx-upstream-config upstream-blocks)
            (map emit-nginx-server-config server-blocks)
-           extra-content
+           (match extra-content
+             ((? string? extra-content) extra-content)
+             ((? list? extra-content)
+              (map (lambda (line)
+                     (simple-format #f "    ~A\n" line))
+                   extra-content)))
            "\n}\n"))))
 
 (define %nginx-accounts

base-commit: 612e4dd98f7d1d015e405af9d029bede3fe3c280
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-27 10:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16  3:57 [bug#71586] [PATCH] services: web: Improve nginx formatting for extra-content Richard Sent
2024-06-19 17:55 ` Tomas Volf
2024-06-19 18:49 ` [bug#71586] [PATCH v2] " Richard Sent
2024-06-20 16:42 ` [bug#71586] [PATCH v3] " Richard Sent
2024-06-20 21:29   ` Tomas Volf
2024-06-27 10:33   ` bug#71586: " Christopher Baines

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.