diff options
Diffstat (limited to 'makefu/2configs')
-rw-r--r-- | makefu/2configs/Reaktor/random-emoji.nix | 25 | ||||
-rw-r--r-- | makefu/2configs/Reaktor/random-emoji.sh | 5 | ||||
-rw-r--r-- | makefu/2configs/Reaktor/shack-correct.nix | 20 | ||||
-rw-r--r-- | makefu/2configs/Reaktor/shack-correct.sh | 6 | ||||
-rw-r--r-- | makefu/2configs/git/cgit-retiolum.nix | 1 |
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"; |