m 2 dirctator: init

This commit is contained in:
makefu 2017-06-18 20:37:35 +02:00
parent 5822253bc1
commit 0735ba03d7
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -0,0 +1,29 @@
{ pkgs, lib, ... }:
with lib;
let
port = 18872;
runit = pkgs.writeDash "runit" ''
set -xeuf
export PULSE_COOKIE=/var/run/pulse/.config/pulse/cookie
echo "$@" | sed 's/^dirctator://' | ${pkgs.espeak}/bin/espeak -v mb-de7 2>&1 | tee -a /tmp/speak
'';
in {
services.logstash = {
enable = true;
inputConfig = ''
irc {
channels => [ "#krebs", "#afra" ]
host => "irc.freenode.net"
nick => "dirctator"
}
'';
filterConfig = ''
'';
outputConfig = ''
stdout { codec => rubydebug }
exec { command => "${runit} '%{message}" }
'';
plugins = [ ];
};
}