summaryrefslogtreecommitdiffstats
path: root/lass/2configs/radio.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2019-01-29 19:17:43 +0100
committerjeschli <jeschli@gmail.com>2019-01-29 19:17:43 +0100
commit924c8fb748a92720c75750cee528ac2f4b7c5c8e (patch)
tree1a3b956f7f8527e533040cee1138810fe304bbc9 /lass/2configs/radio.nix
parent06b6454af78e8236a67d69cab94f62c32054be47 (diff)
parente64bbd8d6864e21f9e7b6b9a11cf95c976bdc109 (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'lass/2configs/radio.nix')
-rw-r--r--lass/2configs/radio.nix61
1 files changed, 37 insertions, 24 deletions
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix
index 987632cd..f88b2627 100644
--- a/lass/2configs/radio.nix
+++ b/lass/2configs/radio.nix
@@ -170,32 +170,45 @@ in {
};
};
- krebs.Reaktor.playlist = {
- nickname = "the_playlist|r";
- channels = [
- "#the_playlist"
- "#krebs"
- ];
- extraEnviron = {
- REAKTOR_HOST = "irc.freenode.org";
- };
- plugins = with pkgs.ReaktorPlugins; [
- (buildSimpleReaktorPlugin "skip" {
- script = "${skip_track}/bin/skip_track";
- pattern = "^skip$";
- })
- (buildSimpleReaktorPlugin "current" {
- script = "${print_current}/bin/print_current";
- pattern = "^current$";
- })
- (buildSimpleReaktorPlugin "suggest" {
- script = "${pkgs.writeDash "suggest" ''
- echo "$@" >> $HOME/playlist_suggest
- ''}";
- pattern = "^suggest: (?P<args>.*)$";
- })
+ krebs.reaktor2.the_playlist = {
+ hostname = "irc.freenode.org";
+ port = "6697";
+ useTLS = true;
+ nick = "the_playlist";
+ plugins = [
+ {
+ plugin = "register";
+ config = {
+ channels = [
+ "#the_playlist"
+ "#krebs"
+ ];
+ };
+ }
+ {
+ plugin = "system";
+ config = {
+ workdir = config.krebs.reaktor2.the_playlist.stateDir;
+ hooks.PRIVMSG = [
+ {
+ activate = "match";
+ pattern = ''!([^ ]+)(?:\s*(.*))?'';
+ command = 1;
+ arguments = [2];
+ commands = {
+ skip.filename = "${skip_track}/bin/skip_track";
+ current.filename = "${print_current}/bin/print_current";
+ suggest.filename = pkgs.writeDash "suggest" ''
+ echo "$@" >> playlist_suggest
+ '';
+ };
+ }
+ ];
+ };
+ }
];
};
+
services.nginx = {
enable = true;
virtualHosts."radio.lassul.us" = {