blob: 19806575670e7e0d83303531210e5eb3aed6af75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|