This repository has no description
921 B
47 lines
1{ self, pkgs, ... }:
2let
3
4 bot_port = "7654";
5 irc_channel = "#binaergewitter";
6in
7{
8 imports = [
9 self.inputs.stockholm.nixosModules.reaktor2
10 ];
11 krebs.reaktor2.bgt-announce = {
12 hostname = "irc.libera.chat";
13 port = "6697";
14 nick = "bgt-announce";
15 API.listen = "inet://127.0.0.1:${bot_port}";
16 plugins = [
17 {
18 plugin = "register";
19 config = {
20 channels = [
21 irc_channel
22 ];
23 };
24 }
25 ];
26 };
27 systemd.services.check_bgt_show = {
28 startAt = "*:0/5";
29 environment = {
30 IRC_CHANNEL = irc_channel;
31 REAKTOR_PORT = bot_port;
32 };
33 path = with pkgs; [
34 curl
35 gnugrep
36 jq
37 ];
38 script = builtins.readFile ./bgt-check.sh;
39 serviceConfig = {
40 DynamicUser = true;
41 StateDirectory = "bgt-announce";
42 WorkingDirectory = "/var/lib/bgt-announce";
43 PrivateTmp = true;
44 };
45 };
46}
47