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

27 lines
692 B
Nix
Raw Normal View History

{ config, ... }:
2023-05-29 00:01:24 +00:00
{
systemd.tmpfiles.rules = [
"d /var/lib/fedifetcher 0744 root root"
];
2023-05-29 00:01:24 +00:00
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-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
serviceConfig =
let
podman = config.virtualisation.podman.package;
image = "ghcr.io/nanos/fedifetcher:latest";
data = "/var/lib/fedifetcher:/app/artifacts";
in
{
Type = "oneshot";
ExecStart = "${podman}/bin/podman run --name fedifetcher -v ${data} --rm ${image} --config=/app/artifacts/config.json";
2023-05-29 00:01:24 +00:00
};
};
}