1
0
Fork 0
dotfiles/system/nixos/fedifetcher.nix
2023-07-07 19:57:55 +02:00

19 lines
606 B
Nix

{ pkgs, config, ... }:
{
systemd.services.fedifetcher = {
description = "FediFetcher";
wants = [ "mastodon-web.service" "mastodon-wait-for-available.service" ];
after = [ "mastodon-web.service" "mastodon-wait-for-available.service" ];
# wantedBy = [ "multi-user.target" ];
startAt = "*:0/25";
serviceConfig = {
Type = "oneshot";
DynamicUser = true;
StateDirectory = "fedifetcher";
LoadCredential = "config.json:${config.age.secrets.fedifetcher-config.path}";
ExecStart = "${pkgs.fedifetcher}/bin/fedifetcher --config=%d/config.json";
};
};
}