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" ]
|
2021-05-25 07:52:00 +00:00
|
|
|
host => "irc.hackint.org"
|
2017-06-18 18:37:35 +00:00
|
|
|
nick => "dirctator"
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
filterConfig = ''
|
|
|
|
'';
|
|
|
|
outputConfig = ''
|
|
|
|
stdout { codec => rubydebug }
|
|
|
|
exec { command => "${runit} '%{message}" }
|
|
|
|
'';
|
2017-06-18 21:23:28 +00:00
|
|
|
extraSettings = ''
|
|
|
|
path.plugins: [ "${pkgs.logstash-output-exec}" ]
|
|
|
|
'';
|
|
|
|
## NameError: `@path.plugins' is not allowable as an instance variable name
|
|
|
|
# plugins = [ pkgs.logstash-output-exec ];
|
2017-06-18 18:37:35 +00:00
|
|
|
};
|
|
|
|
}
|