diff options
-rw-r--r-- | fleet/modules/public-inbox.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fleet/modules/public-inbox.nix b/fleet/modules/public-inbox.nix index 32d99f3..c263fad 100644 --- a/fleet/modules/public-inbox.nix +++ b/fleet/modules/public-inbox.nix @@ -87,7 +87,6 @@ in { wantedBy = [ "public-inbox-watch.service" "multi-user.target" ]; before = [ "public-inbox-watch.service" ]; - # TODO(V): Add ${pi-config.inboxdir}/description to the reload conditions, since new descriptions don't get picked up after being updated. script = concatStrings (mapAttrsToList (inbox: config: let pi-config = public-inbox-config.publicinbox.${inbox}; in '' ${pkgs.public-inbox-init-lite}/bin/public-inbox-init-lite ${inbox} ${pi-config.inboxdir} ${head pi-config.address} ln -sf ${pkgs.writeText "public-inbox-description" config.description} ${pi-config.inboxdir}/description @@ -130,6 +129,9 @@ in { requires = [ "public-inbox-httpd.socket" ]; after = [ "public-inbox-httpd.socket" ]; + # Descriptions are cached for the lifetime of the process, so updates require a restart to get picked up. + restartTriggers = mapAttrsToList (inbox: config: "${inbox}:${builtins.hashString "sha256" config.description}") cfg.inboxes; + inherit environment; serviceConfig = { |