Merge remote-tracking branch 'prism/master'
This commit is contained in:
commit
3220cc238a
@ -4,28 +4,59 @@ in {
|
|||||||
users.oxzi = {
|
users.oxzi = {
|
||||||
mail = "post@0x21.biz";
|
mail = "post@0x21.biz";
|
||||||
};
|
};
|
||||||
hosts.ancha = {
|
hosts = {
|
||||||
owner = config.krebs.users.oxzi;
|
ancha = {
|
||||||
nets.retiolum = {
|
owner = config.krebs.users.oxzi;
|
||||||
aliases = [ "ancha.oxzi.r" ];
|
nets.retiolum = {
|
||||||
ip4.addr = "10.243.32.1";
|
aliases = [
|
||||||
ip6.addr = (lib.krebs.genipv6 "retiolum" "oxzi" { hostName = "ancha"; }).address;
|
"ancha.oxzi.r"
|
||||||
tinc.pubkey = ''
|
"gosh.r"
|
||||||
-----BEGIN RSA PUBLIC KEY-----
|
];
|
||||||
MIICCgKCAgEA5RSP7nWZ1c04kvQBxoHqcdRKpJuRDzD3f0Nl2KhS7QsAqHJGdK7T
|
ip4.addr = "10.243.32.1";
|
||||||
RrsoZcvJaKIFnlohJ4T1YpGGcXqShhTmKt3sm/0awLhD+zTE8lAlvEj+lnCkHls8
|
ip6.addr = (lib.krebs.genipv6 "retiolum" "oxzi" { hostName = "ancha"; }).address;
|
||||||
eXO+VDB5FelibW/wEnvdImxKBaSVt4RLmMyTuzS9xklEq8Q+wMvzJktnV3pWJjYX
|
tinc.pubkey = ''
|
||||||
/JBYQEUHlrqXldBlKGHkU1KhFZHD/wzV5Ybkku4w1BHrMUHJNwHpTshD/QBDiJFj
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
iRA3e3Jfpp3qj2uWetGuP7NlFpZCh/fSrTqkAE8uShcFlplbgJIEGz2pp644maqw
|
MIICCgKCAgEA5RSP7nWZ1c04kvQBxoHqcdRKpJuRDzD3f0Nl2KhS7QsAqHJGdK7T
|
||||||
XxRWPH1Iy5NHwVz/GSzQ67vsEunRJjueFQk8gxnhjh/CAlmE9VdxfGQOkejBAq+X
|
RrsoZcvJaKIFnlohJ4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yq4glI4eRjnRmrnXOwTb7Y2MCAwEAAQ==
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
'';
|
||||||
|
tinc.pubkey_ed25519 = "oLvC/Y3jfGH4a8mBbv9eCCWKsx32gDGW/iCyia/fuBD";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
marohu = {
|
||||||
|
owner = config.krebs.users.oxzi;
|
||||||
|
nets.retiolum = {
|
||||||
|
aliases = [
|
||||||
|
"marohu.oxzi.r"
|
||||||
|
];
|
||||||
|
ip4.addr = "10.243.32.2";
|
||||||
|
ip6.addr = (lib.krebs.genipv6 "retiolum" "oxzi" { hostName = "marohu"; }).address;
|
||||||
|
tinc.pubkey = ''
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIICCgKCAgEAxHLkvuH9JMXay/fEmoWTEqLHg9A50EzkxPVBn4nyezgp5vxsUqJz
|
||||||
|
Ys0VnO6jjgz9T6N8u0CaavsqFy+X48A/+uB5nd/nGDZNaeTg+HUdznT4OFAJEaDi
|
||||||
|
uQREDsR5ZwmpI534eESHMdn5LSb/+5CUgj2xsoOBxnukALm1YccPxR0PPibCm+Z1
|
||||||
|
P8r+1+nBgIPv+cknTXzhWMF/L7UOXuyV3Jmk1BIhwYmzWVes6idtIyJwoCbssoQT
|
||||||
|
cl21Czvhwx63o/QEa81qKeCK3AAAnMbp1tAxnzl7Wr/cSoBYRgSIZkOQPEUNHvpF
|
||||||
|
fT9UzZ3DZyAOMWNjqiK1M93VruFYer05qO3jGgumDey/9gLjP6GMjBw9jVDNY9yn
|
||||||
|
8mOKz9dkrP3v/A96Uqp+w/lYO87YrxA+h9BYY4jyPngGh0DoXddHLHAKco39vbq8
|
||||||
|
4vQRsK5QNgquF7O9aBDMSrFosk1VFedpZQwC2LaXcjtI3aMq3vIURTbuWkutAjAd
|
||||||
|
p9a5dRa62pWk41n6yLmalCkqnHoqVUaft9wZIxbcrDLUso7QxY6kFhjADSijnr5B
|
||||||
|
HrBXJhNLGVjBD/W++l2CJ+L4njmy4eGrOTBvIzosCMbtgMtfuu7WSQhsjxTwclbD
|
||||||
|
utT3hmgxDPZydsvzRMsLNvNQwUoiLAL4mz27V9hYcJTKPAbUL3y8h48CAwEAAQ==
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
'';
|
||||||
|
tinc.pubkey_ed25519 = "q/DIqHkb/8Qu7OrCXaBeuxkT9XNPmxo8uF3GkFFC6rJ";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -111,6 +111,7 @@ with import <stockholm/lib>;
|
|||||||
<stockholm/lass/2configs/jitsi.nix>
|
<stockholm/lass/2configs/jitsi.nix>
|
||||||
<stockholm/lass/2configs/fysiirc.nix>
|
<stockholm/lass/2configs/fysiirc.nix>
|
||||||
<stockholm/lass/2configs/bgt-bot>
|
<stockholm/lass/2configs/bgt-bot>
|
||||||
|
<stockholm/lass/2configs/mumble-reminder.nix>
|
||||||
<stockholm/krebs/2configs/mastodon-proxy.nix>
|
<stockholm/krebs/2configs/mastodon-proxy.nix>
|
||||||
{
|
{
|
||||||
services.tor = {
|
services.tor = {
|
||||||
|
107
lass/2configs/mumble-reminder.nix
Normal file
107
lass/2configs/mumble-reminder.nix
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
{ config, lib, pkgs, ... }: let
|
||||||
|
write_to_irc = chan: pkgs.writeDash "write_to_irc" ''
|
||||||
|
${pkgs.curl}/bin/curl -fsSv --unix-socket '${lib.removePrefix "unix:" config.krebs.reaktor2.mumble-reminder.API.listen}' http://z/ \
|
||||||
|
-H content-type:application/json \
|
||||||
|
-d "$(${pkgs.jq}/bin/jq -n \
|
||||||
|
--arg text "$1" '{
|
||||||
|
command:"PRIVMSG",
|
||||||
|
params:["${chan}",$text]
|
||||||
|
}'
|
||||||
|
)"
|
||||||
|
'';
|
||||||
|
animals = ''
|
||||||
|
Erdferkel
|
||||||
|
Paviane
|
||||||
|
Raupen
|
||||||
|
Australischen Wildhunde
|
||||||
|
Emus
|
||||||
|
Flundern
|
||||||
|
Gorillas
|
||||||
|
Kolibris
|
||||||
|
Schwarzfersenantilopen
|
||||||
|
Quallen
|
||||||
|
Kois
|
||||||
|
Faulaffen
|
||||||
|
Schraubenziegen
|
||||||
|
Nachtigalle
|
||||||
|
Okapis
|
||||||
|
Stachelschweine
|
||||||
|
Kurzschwanzkängurus
|
||||||
|
Waschbären
|
||||||
|
'';
|
||||||
|
systemPlugin = {
|
||||||
|
plugin = "system";
|
||||||
|
config = {
|
||||||
|
hooks.PRIVMSG = [
|
||||||
|
{
|
||||||
|
pattern = "^erriner mich$";
|
||||||
|
activate = "match";
|
||||||
|
command = {
|
||||||
|
filename = pkgs.writeDash "add_remind" ''
|
||||||
|
echo "$_from" >> /var/lib/reaktor2-mumble-reminder/users
|
||||||
|
sort /var/lib/reaktor2-mumble-reminder/users | uniq > /var/lib/reaktor2-mumble-reminder/users.tmp
|
||||||
|
mv /var/lib/reaktor2-mumble-reminder/users.tmp /var/lib/reaktor2-mumble-reminder/users
|
||||||
|
echo "Ich werde $_from in zukunft an das meetup errinern"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
pattern = "^nerv nicht$";
|
||||||
|
activate = "match";
|
||||||
|
command = {
|
||||||
|
filename = pkgs.writeDash "add_remind" ''
|
||||||
|
${pkgs.gnused}/bin/sed -i "/$_from/d" /var/lib/reaktor2-mumble-reminder/users
|
||||||
|
echo "okok, Ich werde $_from nich mehr errinern"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
krebs.reaktor2.mumble-reminder = {
|
||||||
|
hostname = "irc.hackint.org";
|
||||||
|
nick = "lassulus__";
|
||||||
|
API.listen = "unix:/var/lib/reaktor2-mumble-reminder/reaktor_hackint.sock";
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
plugin = "register";
|
||||||
|
config = {
|
||||||
|
channels = [
|
||||||
|
"#krebs"
|
||||||
|
"#nixos"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
systemPlugin
|
||||||
|
];
|
||||||
|
port = "6697";
|
||||||
|
};
|
||||||
|
systemd.services.mumble-reminder-nixos = {
|
||||||
|
description = "weekly reminder for nixos mumble";
|
||||||
|
startAt = "Thu *-*-* 19:00:00 Europe/Berlin";
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = pkgs.writers.writeDash "mumble_reminder" ''
|
||||||
|
animals='
|
||||||
|
${animals}
|
||||||
|
'
|
||||||
|
${write_to_irc "#nixos"} "Es ist Donnerstag meine $(echo "$animals" | grep -v '^$' | shuf -n1 )!"
|
||||||
|
${write_to_irc "#nixos"} "kommt auf mumble://lassul.us"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.services.mumble-reminder-krebs = {
|
||||||
|
description = "weekly reminder for nixos mumble";
|
||||||
|
startAt = "Thu *-*-* 19:00:00 Europe/Berlin";
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = pkgs.writers.writeDash "mumble_reminder" ''
|
||||||
|
animals='
|
||||||
|
${animals}
|
||||||
|
'
|
||||||
|
${write_to_irc "#krebs"} "Es ist Donnerstag meine $(echo "$animals" | grep -v '^$' | shuf -n1 )!"
|
||||||
|
${write_to_irc "#krebs"} "$(cat /var/lib/reaktor2-mumble-reminder/users | ${pkgs.findutils}/bin/xargs echo) : mumble?"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user