totoro: add twitternuke timer
This commit is contained in:
parent
df2e3c3464
commit
aba7285824
2 changed files with 30 additions and 2 deletions
24
ops/nixos/lib/twitternuke.nix
Normal file
24
ops/nixos/lib/twitternuke.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
# 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,8 +6,12 @@
|
|||
let
|
||||
inherit (depot.ops) secrets;
|
||||
in {
|
||||
imports =
|
||||
[ ../../../third_party/nixpkgs/nixos/modules/installer/scan/not-detected.nix ../lib/client.nix ../lib/whitby-distributed.nix ];
|
||||
imports = [
|
||||
../../../third_party/nixpkgs/nixos/modules/installer/scan/not-detected.nix
|
||||
../lib/client.nix
|
||||
../lib/whitby-distributed.nix
|
||||
../lib/twitternuke.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.kernelModules = lib.mkAfter [ "kvm-intel" ];
|
||||
|
|
Loading…
Reference in a new issue