Wrap rspamc to avoid having to specific socket manually

This commit is contained in:
Sandro Jäckel 2024-08-05 19:00:00 +02:00
parent 059b50b2e7
commit af7d3bf5da
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
2 changed files with 12 additions and 6 deletions

View file

@ -25,6 +25,15 @@ let
in
{
config = with cfg; lib.mkIf enable {
environment.systemPackages = lib.mkBefore [
(pkgs.runCommand "rspamc-wrapped" {
nativeBuildInputs = with pkgs; [ makeWrapper ];
}''
makeWrapper ${pkgs.rspamd}/bin/rspamc $out/bin/rspamc \
--add-flags "-h /var/run/rspamd/worker-controller.sock"
'')
];
services.rspamd = {
enable = true;
inherit debug;