From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ese3t-0008Cm-JF for guix-patches@gnu.org; Sun, 04 Mar 2018 19:33:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ese3q-0000Td-FH for guix-patches@gnu.org; Sun, 04 Mar 2018 19:33:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:36983) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ese3q-0000TT-Av for guix-patches@gnu.org; Sun, 04 Mar 2018 19:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ese3q-0003To-1I for guix-patches@gnu.org; Sun, 04 Mar 2018 19:33:02 -0500 Subject: [bug#30701] [PATCH 1/4] services: Rework the PostgreSQL config file to use a record type. Resent-Message-ID: References: <87po4jpsgc.fsf@cbaines.net> <20180304191633.20262-1-mail@cbaines.net> From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <20180304191633.20262-1-mail@cbaines.net> Date: Mon, 05 Mar 2018 01:32:10 +0100 Message-ID: <87lgf7z7jp.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain 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: Christopher Baines Cc: 30701@debbugs.gnu.org Hi Christopher, Christopher Baines writes: > For the default config file representation. This makes it possible to more > easily change the configuration file, and have dynamic content. In particular, > I'm looking at adding a pid file location to the config file. > > * gnu/services/databases.scm (): New record type. > (%default-postgres-config): Remove this, it's been replaced by the > configuration file. > (): Alter the default for the config file field. > (postgresql-service): Alter the default value for the config-file parameter. > --- > gnu/services/databases.scm | 86 +++++++++++++++++++++++++++++++++++----------- > 1 file changed, 66 insertions(+), 20 deletions(-) Thank you for this work! > +(define-gexp-compiler (postgresql-config-file-compiler > + (file ) system target) > + (match file > + (($ log-destination hba-file > + ident-file extra-config) > + (define (quote string) > + (if string > + (list "'" string "'") > + (list))) I don't think it's a good thing to hide one of the most important lisp functions :-).