diff options
author | Ben Sima <ben@bsima.me> | 2022-07-05 11:39:55 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2022-07-05 11:39:55 -0400 |
commit | 02a806624b8a66114192ac75ae4114a3c088b170 (patch) | |
tree | 7421c43b57000b6bf316f4a57c8885a601fd3335 /README | |
parent | 8b324c4becd6e42352de30d74dc931f50263bb4c (diff) |
Diffstat (limited to 'README')
-rw-r--r-- | README | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -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 |