depot/ops/nixos/lib/twitternuke.nix

25 lines
624 B
Nix
Raw Permalink Normal View History

2021-01-06 21:29:33 +00:00
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ pkgs, depot, lib, ... }:
{
config = {
systemd.services.twitternuke = {
serviceConfig = {
Type = "oneshot";
ExecStart = "${depot.go.twitternuke}/bin/twitternuke --dryrun=false --tweets_from_api";
EnvironmentFile = "/home/lukegb/twitternuke/environment.txt";
};
};
systemd.timers.twitternuke = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "daily";
AccuracySec = "1h";
Persistent = true;
};
};
};
}