1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/configs/telegram-bots/hesychius.nix

28 lines
688 B
Nix
Raw Normal View History

2022-07-21 20:33:37 +02:00
{
pkgs,
config,
inputs,
2022-07-21 20:33:37 +02:00
lib,
...
}: let
hesychius = inputs.scripts.outPath + "/hesychius/hesychius.txt";
2022-07-21 20:33:37 +02:00
in {
niveum.telegramBots.hesychius = {
enable = true;
time = "08: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}";
};
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";
}
];
}