From c91d488dc92cde8dab024d1e1b98fd471a00b9f5 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Wed, 30 Nov 2022 01:04:07 -0500 Subject: nix: include host in DATABASE_URL --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d83334b..a65e833 100644 --- a/flake.nix +++ b/flake.nix @@ -266,7 +266,7 @@ RESTRICT = lib.mkIf (cfg.restrictFile != null) "${cfg.restrictFile}"; USER_ID_MAPPING = lib.mkIf (cfg.userIdMappingFile != null) "${cfg.userIdMappingFile}"; - DATABASE_URL = lib.mkIf cfg.postgres.enable "postgres://${cfg.user}@/${cfg.postgres.db}"; + DATABASE_URL = lib.mkIf cfg.postgres.enable "postgres:///${cfg.postgres.db}?user=${cfg.user}&host=/var/run/postgresql"; }; systemd.services.thulani = { -- cgit v1.3.1