about summary refs log tree commit diff
path: root/users/aspen/system/home/modules/depot-inbox.nix
{ config, lib, pkgs, ... }:

let
  depot = config.lib.depot;
in

{
  systemd.user = {
    services.sync-depot-public-inbox = {
      Service.ExecStart = pkgs.writeShellScript "sync-depot-public-inbox" ''
        ${depot.tools.fetch-depot-inbox}/bin/fetch-depot-inbox \
          /home/aspen/mail/tvl/
        ${pkgs.notmuch}/bin/notmuch new
      '';
    };

    timers.sync-depot-public-inbox = {
      Unit.Description = "Sync the depot public inbox";
      Timer = {
        OnCalendar = "*:*";
        Unit = "sync-depot-public-inbox.service";
      };
      Install.WantedBy = [ "timers.target" ];
    };
  };
}