summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-09 14:48:58 +0200
committertv <tv@shackspace.de>2015-10-09 14:48:58 +0200
commit96f4248b65ff1539eded24572ae1805b27c53d50 (patch)
tree31ff450cc4a5166306c62f99fdd2d1caf3219ecb /makefu/2configs
parent694c79a5bc05014604fa2467f965b370102ff78f (diff)
parent4072a32f89b9cc1c1e7c3583ac5b9ce5dcb004af (diff)
Merge remote-tracking branch 'cloudkrebs/master'
Diffstat (limited to 'makefu/2configs')
-rw-r--r--makefu/2configs/Reaktor/random-emoji.nix25
-rw-r--r--makefu/2configs/Reaktor/random-emoji.sh5
-rw-r--r--makefu/2configs/Reaktor/shack-correct.nix20
-rw-r--r--makefu/2configs/Reaktor/shack-correct.sh6
-rw-r--r--makefu/2configs/git/cgit-retiolum.nix1
5 files changed, 57 insertions, 0 deletions
diff --git a/makefu/2configs/Reaktor/random-emoji.nix b/makefu/2configs/Reaktor/random-emoji.nix
new file mode 100644
index 000000000..b2d99b36b
--- /dev/null
+++ b/makefu/2configs/Reaktor/random-emoji.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, ... }:
+
+with pkgs;
+let
+ rpkg = pkgs.substituteAll( {
+ name="random-emoji";
+ dir= "bin";
+ isExecutable=true;
+ src= ./random-emoji.sh;
+ });
+ rpkg-path = lib.makeSearchPath "bin" (with pkgs; [
+ coreutils
+ gnused
+ gnugrep
+ curl]);
+in {
+ # TODO: make origin a variable, <- module is generic enough to handle different origins, not only stockholm
+ krebs.Reaktor.extraConfig = ''
+ public_commands.insert(0,{
+ 'capname' : "emoji",
+ 'pattern' : indirect_pattern.format("emoji"),
+ 'argv' : ["${rpkg}/bin/random-emoji"],
+ 'env' : { 'PATH':'${rpkg-path}' } })
+ '';
+}
diff --git a/makefu/2configs/Reaktor/random-emoji.sh b/makefu/2configs/Reaktor/random-emoji.sh
new file mode 100644
index 000000000..913d615be
--- /dev/null
+++ b/makefu/2configs/Reaktor/random-emoji.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+curl http://emojicons.com/random -s | \
+ grep data-text | \
+ sed -n 's/.*>\(.*\)<\/textarea>/\1/p' | \
+ head -n 1
diff --git a/makefu/2configs/Reaktor/shack-correct.nix b/makefu/2configs/Reaktor/shack-correct.nix
new file mode 100644
index 000000000..8f30807f1
--- /dev/null
+++ b/makefu/2configs/Reaktor/shack-correct.nix
@@ -0,0 +1,20 @@
+{ config, lib, pkgs, ... }:
+
+with pkgs;
+let
+ script = pkgs.substituteAll ( {
+ name="shack-correct";
+ isExecutable=true;
+ dir = "";
+ src = ./shack-correct.sh;
+ });
+in {
+ krebs.Reaktor.extraConfig = ''
+ public_commands.insert(0,{
+ 'capname' : "shack-correct",
+ 'pattern' : '^(?P<args>.*Shack.*)$$',
+ 'argv' : ["${script}"],
+ 'env' : { }})
+ '';
+}
+
diff --git a/makefu/2configs/Reaktor/shack-correct.sh b/makefu/2configs/Reaktor/shack-correct.sh
new file mode 100644
index 000000000..3b4d04f80
--- /dev/null
+++ b/makefu/2configs/Reaktor/shack-correct.sh
@@ -0,0 +1,6 @@
+#! /bin/sh
+set -eu
+printf "Sie meinten wohl \""
+echo -n $@ | sed 's/Shack/shack/g'
+echo "\""
+echo "${_from}--"
diff --git a/makefu/2configs/git/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix
index 40b51e601..1277a014e 100644
--- a/makefu/2configs/git/cgit-retiolum.nix
+++ b/makefu/2configs/git/cgit-retiolum.nix
@@ -29,6 +29,7 @@ let
hooks = {
post-receive = git.irc-announce {
nick = config.networking.hostName;
+ verbose = config.krebs.build.host.name == "pnp";
channel = "#retiolum";
# TODO remove the hardcoded hostname
server = "cd.retiolum";