From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d63Ef-00082I-Ko for guix-patches@gnu.org; Wed, 03 May 2017 18:59:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d63Ec-0002lk-IV for guix-patches@gnu.org; Wed, 03 May 2017 18:59:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55150) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d63Ec-0002lS-EY for guix-patches@gnu.org; Wed, 03 May 2017 18:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d63Eb-0007pz-SF for guix-patches@gnu.org; Wed, 03 May 2017 18:59:01 -0400 Subject: bug#26684: let nginx configs reference the store Resent-Message-ID: References: From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: Date: Thu, 04 May 2017 00:58:34 +0200 Message-ID: <87pofp7dk5.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Andy Wingo Cc: 26684@debbugs.gnu.org Andy Wingo writes: > Hi, > > Is this the right way to do things? Passing lists around seems to be an > intermediate point between strings and proper configuration values -- as > such it seems like a useful intermediate step. The context is that I > need to be able to extend the nginx configuration with a server config > that references a store path. > > Andy > > From b56b797e2ca26619485d874110d3f1f0ae96fba4 Mon Sep 17 00:00:00 2001 > From: Andy Wingo > Date: Thu, 27 Apr 2017 19:49:02 +0200 > Subject: [PATCH 1/5] gnu: services: Nginx configs can reference store > > * gnu/services/web.scm (config-domain-strings, config-index-strings): Emit > lists instead of strings. > (emit-nginx-location-config, emit-nginx-server-config) > (emit-nginx-upstream-config): Rename from nginx-location-config, > default-nginx-server-config, and nginx-upstream-config. Emit lists instead of > strings. > (flatten): New helper. > (default-nginx-config): Use flatten helper to write nginx conf. This allows > location configs to reference store values. > --- > gnu/services/web.scm | 150 +++++++++++++++++++++++++-------------------------- > 1 file changed, 74 insertions(+), 76 deletions(-) Hi Andy, I tested it successfully (with a reference to the store), and it looks good to me as well. Thanks you! You'll have some rebasing work to do though with (lstat ssl-cert...). Clément