1
0
Fork 0
dotfiles/system/nixos/fedifetcher.nix

25 lines
792 B
Nix
Raw Normal View History

2023-05-29 00:01:24 +00:00
{ config, secret, ... }:
{
systemd.services.fedifetcher = {
2023-05-31 08:46:40 +00:00
description = "FediFetcher";
2023-06-04 14:41:03 +00:00
wants = [ "mastodon-web.service" ];
after = [ "mastodon-web.service" ];
2023-05-31 08:46:40 +00:00
wantedBy = [ "multi-user.target" ];
startAt = "*:0/25";
2023-05-29 00:01:24 +00:00
serviceConfig =
let
podman = config.virtualisation.podman.package;
image = "ghcr.io/nanos/fedifetcher:latest";
data = "/var/lib/fedifetcher:/app/artifacts";
token = secret.mastodon.fedifetcher.accessToken;
server = "mastodon.kempkens.io";
in
{
Type = "oneshot";
2023-05-31 08:46:40 +00:00
ExecStart = "${podman}/bin/podman run --name fedifetcher -v ${data} --rm ${image} --access-token=${token} --server=${server} --home-timeline-length=50 --max-followings=5 --from-notifications=1";
2023-05-29 00:01:24 +00:00
};
};
}