2023-02-22 10:02:55 +01:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
config,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
2022-02-07 11:31:48 +01:00
|
|
|
systemd.services.moinbot = {
|
|
|
|
|
startAt = "7:00";
|
|
|
|
|
script = ''
|
2022-10-18 09:51:04 +02:00
|
|
|
greeting=$(echo "moin
|
2023-09-14 15:57:28 +02:00
|
|
|
MOIN
|
|
|
|
|
moin: gib" | shuf -n1)
|
2023-02-22 10:02:55 +01:00
|
|
|
echo "$greeting" | ${config.nur.repos.mic92.ircsink}/bin/ircsink \
|
2022-10-18 09:51:04 +02:00
|
|
|
--nick "$greeting""bot" \
|
2022-02-07 11:31:48 +01:00
|
|
|
--server irc.hackint.org \
|
|
|
|
|
--port 6697 \
|
|
|
|
|
--secure \
|
2023-06-23 15:42:58 +02:00
|
|
|
--target '#hsmr' >/dev/null 2>&1
|
2022-02-07 11:31:48 +01:00
|
|
|
'';
|
|
|
|
|
serviceConfig.DynamicUser = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-22 11:47:59 +02:00
|
|
|
niveum.passport.services = [
|
|
|
|
|
{
|
|
|
|
|
title = "moinbot";
|
2023-02-16 14:32:42 +01:00
|
|
|
description = "greets #hsmr-moin:hackint.org daily.";
|
2022-05-22 11:47:59 +02:00
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
2022-02-07 11:31:48 +01:00
|
|
|
systemd.timers.moinbot.timerConfig.RandomizedDelaySec = "14h";
|
|
|
|
|
}
|