From a5e26447d766a5ec05e7f5d59c021d1d000c2f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 1 Aug 2025 05:17:37 +0200 Subject: [PATCH] nixos/prosody: fix empty config check output, fix some errors which are not fatal --- nixos/modules/services/networking/prosody.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index 40ae4c647760..468549281fc8 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -956,14 +956,18 @@ in environment.etc."prosody/prosody.cfg.lua".source = if cfg.checkConfig then - pkgs.runCommandLocal "prosody.cfg.lua-checked" + pkgs.runCommandLocal "prosody.cfg.lua" { nativeBuildInputs = [ cfg.package ]; } '' cp ${configFile} prosody.cfg.lua + # Replace the hardcoded path to cacerts with one that is accessible in the build sandbox + sed 's|/etc/ssl/certs/ca-bundle.crt|${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt|' -i prosody.cfg.lua + # For some reason prosody hard fails to "find" certificates when this directory does not exist + mkdir certs prosodyctl --config ./prosody.cfg.lua check config - touch $out + cp prosody.cfg.lua $out '' else configFile;