From 20ce4199ba7efccb1bb6fd65bce339245b46d4dc Mon Sep 17 00:00:00 2001 From: eyjhb Date: Fri, 17 Jan 2025 20:25:29 +0100 Subject: [PATCH] stalwart: automatically reload when cert is updated --- machines/gerd/services/stalwart/stalwart.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/machines/gerd/services/stalwart/stalwart.nix b/machines/gerd/services/stalwart/stalwart.nix index f2435c4..5a174d8 100644 --- a/machines/gerd/services/stalwart/stalwart.nix +++ b/machines/gerd/services/stalwart/stalwart.nix @@ -146,8 +146,10 @@ in { # need to change group to stalwart-mail for cert + add nginx to stalwart-mail group to do HTTP ACME users.users.nginx.extraGroups = [ stalwart_group ]; - security.acme.certs."${svc_domain}".group = stalwart_group; - + security.acme.certs."${svc_domain}" = { + group = stalwart_group; + reloadServices = [ config.systemd.services.stalwart-mail.name ]; + }; # setup secrets for stalwart # setup access to ldap bind user credential