From 02a806624b8a66114192ac75ae4114a3c088b170 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 5 Jul 2022 11:39:55 -0400 Subject: Add setup and build info --- README | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README (limited to 'README') diff --git a/README b/README new file mode 100644 index 0000000..1980657 --- /dev/null +++ b/README @@ -0,0 +1,40 @@ +To develop, run: + + nix-shell + +For API setup instructions: + + twitter-bot --instructions + +To install and deploy: + + nix-build . + nix-env -i ./result + +Now you can copy the systemd unit file to `~/.config/systemd/user/` and enable: + + systemctl --user enable twitter-bot.service twitter-bot.timer + +Example systemd unit file: + + [Unit] + Description=Zulip Twitter Bot + + [Service] + Type=oneshot + ExecStart=/home/ben/.nix-profile/bin/twitter-bot --dry-run --stream investing --twitter-name michaeljburry + ExecStart=/home/ben/.nix-profile/bin/twitter-bot --dry-run --stream bitcoin --twitter-name 100trillionUSD + + [Install] + WantedBy=basic.target + +Example timer unit, running every 5 minutes: + + [Unit] + Description=Run zulip bot + + [Timer] + OnCalendar=*-*-* *:0/5 + + [Install] + WantedBy=timer.target -- cgit v1.2.3