From 8e9f1af89b42fa073e84ef972ede9bfdd86e3caf Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 7 Apr 2020 17:37:03 +0100 Subject: [PATCH] Use the config options when creating the default paramstring --- guix-data-service/database.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guix-data-service/database.scm b/guix-data-service/database.scm index 448f16f..455ce82 100644 --- a/guix-data-service/database.scm +++ b/guix-data-service/database.scm @@ -19,6 +19,7 @@ #:use-module (system foreign) #:use-module (ice-9 match) #:use-module (squee) + #:use-module (guix-data-service config) #:export (with-postgresql-connection with-postgresql-transaction @@ -37,7 +38,10 @@ (define paramstring (string-append (or (getenv "GUIX_DATA_SERVICE_DATABASE_PARAMSTRING") - "dbname=guix_data_service user=guix_data_service") + (simple-format + #f "dbname=~A user=~A" + (%config 'database-name) + (%config 'database-user))) " application_name='guix-data-service " name "'")) (let* ((conn (connect-to-postgres-paramstring