From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esFXZ-0002sa-OA for guix-patches@gnu.org; Sat, 03 Mar 2018 17:22:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esFXW-0004Mk-GO for guix-patches@gnu.org; Sat, 03 Mar 2018 17:22:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:35370) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esFXW-0004Mg-Co for guix-patches@gnu.org; Sat, 03 Mar 2018 17:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1esFXW-0007FM-6I for guix-patches@gnu.org; Sat, 03 Mar 2018 17:22:02 -0500 Subject: [bug#30691] [PATCH 1/3] services: postgresql: Add a default-value to the postgresql-service-type. References: <87o9k4relq.fsf@cbaines.net> In-Reply-To: <87o9k4relq.fsf@cbaines.net> Resent-Message-ID: From: Christopher Baines Date: Sat, 3 Mar 2018 22:21:08 +0000 Message-Id: <20180303222110.27632-1-mail@cbaines.net> 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: 30691@debbugs.gnu.org * gnu/packages/databases.scm () [config-file,data-directory]: Add default. (postgresql-service-type)[default-value]: Set to (postgresql-configuration). --- gnu/services/databases.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index b34a67aa9..3db9472ee 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -77,8 +77,10 @@ (default 5432)) (locale postgresql-configuration-locale (default "en_US.utf8")) - (config-file postgresql-configuration-file) - (data-directory postgresql-configuration-data-directory)) + (config-file postgresql-configuration-file + (default %default-postgres-config)) + (data-directory postgresql-configuration-data-directory + (default "/var/lib/postgresql/data"))) (define %default-postgres-hba (plain-file "pg_hba.conf" @@ -184,7 +186,8 @@ host all all ::1/128 trust")) (service-extension activation-service-type postgresql-activation) (service-extension account-service-type - (const %postgresql-accounts)))))) + (const %postgresql-accounts)))) + (default-value (postgresql-configuration)))) (define* (postgresql-service #:key (postgresql postgresql) (port 5432) -- 2.16.0