diff --git a/configs/telegram-bots/default.nix b/configs/telegram-bots/default.nix index 9c1957a..fabc741 100644 --- a/configs/telegram-bots/default.nix +++ b/configs/telegram-bots/default.nix @@ -18,6 +18,7 @@ in { ./literature-quote.nix ./astrology.nix ./autorenkalender.nix + ./hesychius.nix ./nachtischsatan.nix ./tlg-wotd.nix diff --git a/configs/telegram-bots/hesychius.nix b/configs/telegram-bots/hesychius.nix new file mode 100644 index 0000000..5dab9a5 --- /dev/null +++ b/configs/telegram-bots/hesychius.nix @@ -0,0 +1,24 @@ +{ + pkgs, + lib, + ... +}: let + hesychius = + "/hesychius/hesychius.txt"; +in { + niveum.telegramBots.hesychius = { + enable = true; + time = "08:00"; + token = lib.strings.fileContents ; + chatIds = ["@HesychiosAlexandreus"]; + parseMode = "Markdown"; + command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}"; + }; + + 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"; + } + ]; +} diff --git a/flake.lock b/flake.lock index 89e306c..746dfc1 100644 --- a/flake.lock +++ b/flake.lock @@ -195,11 +195,11 @@ "scripts": { "flake": false, "locked": { - "lastModified": 1657447671, - "narHash": "sha256-SjKlNLllYdW/OHLk55hh23E3XsBU+R0Pu18LXfsxgH0=", + "lastModified": 1658427979, + "narHash": "sha256-5W0omdIH6SAZyXSASxdlDK9+u8vbwAlHdh5gAEP+QHQ=", "owner": "kmein", "repo": "scripts", - "rev": "0bfb5d29cbd948a82d2a1c274bc0d374a88c9c88", + "rev": "9b945b3f38297b1cbd6a9efe337c0805d6e2997d", "type": "github" }, "original": {