stockholm/makefu/2configs/deployment/dirctator.nix

31 lines
671 B
Nix
Raw Normal View History

2017-06-18 18:37:35 +00:00
{ 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 = {
2017-06-18 20:48:40 +00:00
package = pkgs.logstash5;
2017-06-18 18:37:35 +00:00
enable = true;
inputConfig = ''
irc {
channels => [ "#krebs", "#afra" ]
host => "irc.freenode.net"
nick => "dirctator"
}
'';
filterConfig = ''
'';
outputConfig = ''
stdout { codec => rubydebug }
exec { command => "${runit} '%{message}" }
'';
plugins = [ ];
};
}