From b93a0c3c7d0241c48a7c2e55ea3fa5609fcfb32d Mon Sep 17 00:00:00 2001 From: Antonin Loubiere <40536532+AntoninLoubiere@users.noreply.github.com> Date: Tue, 18 Aug 2026 12:47:01 +0200 Subject: [PATCH] mediawiki: fix postgres external database host address Fixes https://github.com/NixOS/nixpkgs/issues/448766 --- nixos/modules/services/web-apps/mediawiki.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/web-apps/mediawiki.nix b/nixos/modules/services/web-apps/mediawiki.nix index b5a3e69209a6..fa1db472ea8f 100644 --- a/nixos/modules/services/web-apps/mediawiki.nix +++ b/nixos/modules/services/web-apps/mediawiki.nix @@ -109,12 +109,12 @@ let ''; dbAddr = - if cfg.database.socket == null then + if cfg.database.type == "postgres" then + (if cfg.database.socket == null then cfg.database.host else cfg.database.socket) + else if cfg.database.socket == null then "${cfg.database.host}:${toString cfg.database.port}" else if cfg.database.type == "mysql" then "${cfg.database.host}:${cfg.database.socket}" - else if cfg.database.type == "postgres" then - "${cfg.database.socket}" else throw "Unsupported database type: ${cfg.database.type} for socket: ${cfg.database.socket}";