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