2022-07-21 20:33:37 +02:00
|
|
|
{
|
|
|
|
|
pkgs,
|
2023-02-22 10:02:55 +01:00
|
|
|
config,
|
|
|
|
|
inputs,
|
2022-07-21 20:33:37 +02:00
|
|
|
lib,
|
|
|
|
|
...
|
|
|
|
|
}: let
|
2023-02-22 10:02:55 +01:00
|
|
|
hesychius = inputs.scripts.outPath + "/hesychius/hesychius.txt";
|
2022-07-21 20:33:37 +02:00
|
|
|
in {
|
|
|
|
|
niveum.telegramBots.hesychius = {
|
|
|
|
|
enable = true;
|
|
|
|
|
time = "08:00";
|
2023-02-22 10:02:55 +01:00
|
|
|
tokenFile = config.age.secrets.telegram-token-kmein.path;
|
2022-07-21 20:33:37 +02:00
|
|
|
chatIds = ["@HesychiosAlexandreus"];
|
|
|
|
|
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
|
|
|
|
|
};
|
|
|
|
|
|
2022-08-30 19:32:49 +02:00
|
|
|
systemd.timers.telegram-bot-hesychius.timerConfig.RandomizedDelaySec = "10h";
|
|
|
|
|
|
2022-07-21 20:33:37 +02:00
|
|
|
niveum.passport.services = [
|
|
|
|
|
{
|
|
|
|
|
title = "Hesychius of Alexandria Bot";
|
|
|
|
|
description = "sends a random word from Hesychius of Alexandria's lexicon to Telegram.";
|
|
|
|
|
link = "https://t.me/HesychiosAlexandreus";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
}
|