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

42 lines
962 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,
...
2025-12-27 22:22:54 +01:00
}:
let
hesychius = inputs.scripts.outPath + "/hesychius/hesychius.txt";
2025-12-27 22:22:54 +01:00
in
{
2024-10-05 14:42:44 +02:00
niveum.bots.hesychius = {
2022-07-21 20:33:37 +02:00
enable = true;
time = "08:00";
2024-10-05 14:42:44 +02:00
mastodon = {
2024-10-05 14:42:44 +02:00
enable = true;
language = "el";
2024-10-05 15:13:57 +02:00
tokenFile = config.age.secrets.mastodon-token-hesychius.path;
2024-10-05 14:42:44 +02:00
};
telegram = {
enable = true;
tokenFile = config.age.secrets.telegram-token-kmein.path;
2025-12-27 22:22:54 +01:00
chatIds = [ "@HesychiosAlexandreus" ];
2024-10-05 14:42:44 +02:00
};
2022-07-21 20:33:37 +02:00
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
};
2024-10-05 14:42:44 +02:00
systemd.timers.bot-hesychius.timerConfig.RandomizedDelaySec = "10h";
2024-10-05 15:13:57 +02:00
age.secrets = {
mastodon-token-hesychius.file = ../../secrets/mastodon-token-hesychius.age;
};
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";
}
];
}