This repository has no description
1.5 kB
56 lines
1{ config, pkgs, ... }:
2
3let
4 hooks = pkgs.reaktor2-plugins.hooks;
5in
6{
7 krebs.reaktor2.coders = {
8 hostname = "irc.hackint.org";
9 port = "9999";
10 useTLS = true;
11 nick = "reaktor2|lass";
12 plugins = [
13 {
14 plugin = "register";
15 config = {
16 channels = [
17 "#coders"
18 "#germany"
19 "#panthermoderns"
20 ];
21 };
22 }
23 {
24 plugin = "system";
25 config = {
26 workdir = config.krebs.reaktor2.coders.stateDir;
27 hooks.PRIVMSG = [
28 hooks.sed
29 hooks.url-title
30 {
31 activate = "match";
32 pattern = ''^!([^ ]+)(?:\s*(.*))?'';
33 command = 1;
34 arguments = [ 2 ];
35 commands = {
36 ping.filename = pkgs.writeDash "ping" ''
37 exec /run/wrappers/bin/ping -q -c1 "$1" 2>&1 | tail -1
38 '';
39 google.filename = pkgs.writeDash "google" ''
40 exec ${pkgs.ddgr}/bin/ddgr -C -n1 --json "$@" | \
41 ${pkgs.jq}/bin/jq '@text "\(.[0].abstract) \(.[0].url)"'
42 '';
43 shrug.filename = pkgs.writeDash "shrug" ''
44 exec echo '¯\_(ツ)_/¯'
45 '';
46 table.filename = pkgs.writeDash "table" ''
47 exec echo '(╯°□°)╯ ┻━┻'
48 '';
49 };
50 }
51 ];
52 };
53 }
54 ];
55 };
56}