aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/guix-data-service.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/guix-data-service.in b/scripts/guix-data-service.in
index a0d64cf..e8b35b5 100644
--- a/scripts/guix-data-service.in
+++ b/scripts/guix-data-service.in
@@ -98,7 +98,11 @@
(string-append "db:pg://"
(%config 'database-user)
"@"
- (%config 'database-host)
+ (if (string=? (%config 'database-host)
+ "localhost")
+ "" ; This means the unix socket
+ ; connection will be used
+ (%config 'database-host))
"/"
(%config 'database-name)))))
(simple-format #t "running command: ~A\n"