From unknown Wed Jun 18 00:28:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#29633 <29633@debbugs.gnu.org> To: bug#29633 <29633@debbugs.gnu.org> Subject: Status: [PATCH] services: nginx: Allow to add raw content to the server blocks. Reply-To: bug#29633 <29633@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:28:03 +0000 retitle 29633 [PATCH] services: nginx: Allow to add raw content to the serv= er blocks. reassign 29633 guix-patches submitter 29633 Cl=C3=A9ment Lassieur severity 29633 normal tag 29633 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 09 17:55:39 2017 Received: (at submit) by debbugs.gnu.org; 9 Dec 2017 22:55:39 +0000 Received: from localhost ([127.0.0.1]:54274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNo1z-0006Ip-CM for submit@debbugs.gnu.org; Sat, 09 Dec 2017 17:55:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNo1x-0006Id-O6 for submit@debbugs.gnu.org; Sat, 09 Dec 2017 17:55:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNo1r-0007Iy-Nt for submit@debbugs.gnu.org; Sat, 09 Dec 2017 17:55:32 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33117) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eNo1r-0007Ie-Ki for submit@debbugs.gnu.org; Sat, 09 Dec 2017 17:55:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNo1q-0001x6-Iy for guix-patches@gnu.org; Sat, 09 Dec 2017 17:55:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNo1l-0007GU-KZ for guix-patches@gnu.org; Sat, 09 Dec 2017 17:55:30 -0500 Received: from mail.lassieur.org ([83.152.10.219]:55594) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eNo1l-0007EZ-5k for guix-patches@gnu.org; Sat, 09 Dec 2017 17:55:25 -0500 Received: from localhost.localdomain (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 420805b6 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Sat, 9 Dec 2017 22:55:18 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= To: guix-patches@gnu.org Subject: [PATCH] services: nginx: Allow to add raw content to the server blocks. Date: Sat, 9 Dec 2017 23:55:04 +0100 Message-Id: <20171209225504.9547-1-clement@lassieur.org> X-Mailer: git-send-email 2.15.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * doc/guix.texi (Web Services): Document 'raw-content'. * gnu/services/web.scm ()[raw-content]: New field. (emit-nginx-server-config): Add it. --- doc/guix.texi | 3 +++ gnu/services/web.scm | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ab1e5d057..09017ec65 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14974,6 +14974,9 @@ you don't have a key or you don't want to use HTTPS. @item @code{server-tokens?} (default: @code{#f}) Whether the server should add its configuration to response. +@item @code{raw-content} (default: @code{'()}) +A list of raw lines added to the server block. + @end table @end deftp diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 7373d5671..78a6ad309 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -52,6 +52,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 @@ -104,7 +105,9 @@ (ssl-certificate-key nginx-server-configuration-ssl-certificate-key (default "/etc/nginx/key.pem")) (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 make-nginx-upstream-configuration @@ -180,7 +183,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)) @@ -213,6 +217,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) -- 2.15.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 16 17:00:22 2017 Received: (at 29633) by debbugs.gnu.org; 16 Dec 2017 22:00:22 +0000 Received: from localhost ([127.0.0.1]:37765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQKVJ-0004Wd-OZ for submit@debbugs.gnu.org; Sat, 16 Dec 2017 17:00:21 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:35900 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQKVI-0004WV-Fb for 29633@debbugs.gnu.org; Sat, 16 Dec 2017 17:00:20 -0500 Received: by mira.cbaines.net (Postfix, from userid 113) id 1BF4713E947; Sat, 16 Dec 2017 22:00:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id A6F0913E946; Sat, 16 Dec 2017 22:00:16 +0000 (GMT) Received: from giedi (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id d2767fff; Sat, 16 Dec 2017 22:00:16 +0000 (UTC) References: <20171209225504.9547-1-clement@lassieur.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Christopher Baines To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: [bug#29633] [PATCH] services: nginx: Allow to add raw content to the server blocks. In-reply-to: <20171209225504.9547-1-clement@lassieur.org> Date: Sat, 16 Dec 2017 22:00:13 +0000 Message-ID: <87tvwqtjte.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29633 Cc: 29633@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cl=C3=A9ment Lassieur writes: > * doc/guix.texi (Web Services): Document 'raw-content'. > * gnu/services/web.scm ()[raw-content]: New f= ield. > (emit-nginx-server-config): Add it. This looks good to me :) I was writing a service for the Apache web server recently, and ended up adding something very similar there [1]. 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D29741 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlo1l21fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XcjyA//YmRNAbEIvmBmHezg13UMZpVSglp40UilpEAY4NfmxusbhqTsqJy4PcCr QKiGwNpfHK57hASroPUM+rJ4/GrOv9Y2oeG/L17bFNGHvE6571HuiV3DeIQj/BRu sy8/Rl7oR99Lzw4KPiwnzWXYKpWtd8ll5sV6f9/Z2vMDMvLRU5xfVPe63K3LCkxp xmtX08bbWU7z2MCXP2ax9l9LuWUcC2qlIkvBWy+Mj6gG32Xo283V0BvVmgyArO9K zCLFUxXCWnm/ewgj36+j/q/hMeQs8/sm7JlvUYfXDefjwUGUiQP+CtZ/pyySzot4 9BVFSsg6lOirl/O2erPoMNt4lt1oPMS20Wgn4UbCC9rZiq7n2Hd9S7/WiniO7CC1 O4iq85Ou4Q7r+M2y5Txk1edGBfc9VCZ+rb9xPwTERVdaaiJAZq8qqAPHqXR7Hc6T jmUZrSipXsmlNj8LcDggLUos5MH0BZa4aTPJDDR5nzd/H+en9+BsdZt9tHym2Mxg D2TJEiujcZn5JpizXCP7TDlOWa7IwUlM9OUnxSwxNBBbo1xbyJ4tCpXBc4j49vG0 LQv1uRJulGb8lovGFHTX3UWSyQ4WEaZjUXz0zPVMErorow9VSPHZ9TZ+ee1IoERv f5g5/U57x05LRzAux6lANmJgqPnBykPC+rtQ97pGIAW4NVasr10= =wBV0 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 06:07:11 2017 Received: (at 29633-done) by debbugs.gnu.org; 18 Dec 2017 11:07:11 +0000 Received: from localhost ([127.0.0.1]:39724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQtGJ-0002Tv-14 for submit@debbugs.gnu.org; Mon, 18 Dec 2017 06:07:11 -0500 Received: from mail.lassieur.org ([83.152.10.219]:46256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQtGI-0002Tn-2I for 29633-done@debbugs.gnu.org; Mon, 18 Dec 2017 06:07:10 -0500 Received: from newt (46.218.109.88 [46.218.109.88]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id aeaf9932 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 18 Dec 2017 11:07:06 +0000 (UTC) References: <20171209225504.9547-1-clement@lassieur.org> <87tvwqtjte.fsf@cbaines.net> User-agent: mu4e 0.9.18; emacs 25.3.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Christopher Baines Subject: Re: [bug#29633] [PATCH] services: nginx: Allow to add raw content to the server blocks. In-reply-to: <87tvwqtjte.fsf@cbaines.net> Date: Mon, 18 Dec 2017 12:07:05 +0100 Message-ID: <87vah470rq.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29633-done Cc: 29633-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Christopher Baines writes: > Clément Lassieur writes: > >> * doc/guix.texi (Web Services): Document 'raw-content'. >> * gnu/services/web.scm ()[raw-content]: New field. >> (emit-nginx-server-config): Add it. > > This looks good to me :) I was writing a service for the Apache web > server recently, and ended up adding something very similar there [1]. > > 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29741 I pushed it. Thank you! From unknown Wed Jun 18 00:28:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 15 Jan 2018 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator