2023-07-07 17:57:55 +00:00
|
|
|
{ pkgs, config, ... }:
|
2023-05-29 00:01:24 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
systemd.services.fedifetcher = {
|
2023-05-31 08:46:40 +00:00
|
|
|
description = "FediFetcher";
|
2023-07-04 17:38:57 +00:00
|
|
|
wants = [ "mastodon-web.service" "mastodon-wait-for-available.service" ];
|
|
|
|
after = [ "mastodon-web.service" "mastodon-wait-for-available.service" ];
|
2023-06-22 18:57:21 +00:00
|
|
|
# wantedBy = [ "multi-user.target" ];
|
2023-05-31 08:46:40 +00:00
|
|
|
startAt = "*:0/25";
|
2023-05-29 00:01:24 +00:00
|
|
|
|
2023-07-03 08:26:35 +00:00
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
2023-07-07 17:57:55 +00:00
|
|
|
DynamicUser = true;
|
|
|
|
StateDirectory = "fedifetcher";
|
|
|
|
LoadCredential = "config.json:${config.age.secrets.fedifetcher-config.path}";
|
|
|
|
ExecStart = "${pkgs.fedifetcher}/bin/fedifetcher --config=%d/config.json";
|
2023-07-03 08:26:35 +00:00
|
|
|
};
|
|
|
|
};
|
2023-05-29 00:01:24 +00:00
|
|
|
}
|