mirror of
https://github.com/kmein/niveum
synced 2026-03-22 12:51:08 +01:00
Compare commits
3 Commits
5bc26ddc12
...
2fb1274286
| Author | SHA1 | Date | |
|---|---|---|---|
| 2fb1274286 | |||
| 2ecf9bd008 | |||
| ea1242933b |
@@ -148,7 +148,12 @@ in {
|
||||
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
|
||||
};
|
||||
}
|
||||
{i18n.defaultLocale = "en_DK.UTF-8";}
|
||||
{
|
||||
i18n = {
|
||||
defaultLocale = "en_DK.UTF-8";
|
||||
supportedLocales = ["all"];
|
||||
};
|
||||
}
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
@@ -10,7 +10,6 @@ in {
|
||||
time = "08:00";
|
||||
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
chatIds = ["@HesychiosAlexandreus"];
|
||||
parseMode = "Markdown";
|
||||
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
|
||||
};
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@ with lib; let
|
||||
startAt = bot.time;
|
||||
serviceConfig.Type = "oneshot";
|
||||
wants = ["network-online.target"];
|
||||
script = strings.concatStringsSep "\n" (["QUOTE=$(${bot.command})" "if [ -n \"$QUOTE\" ]; then"]
|
||||
script = strings.concatStringsSep "\n" (["QUOTE=$(${bot.command})" "if [ -n \"$QUOTE\" ]; then" "echo $QUOTE >&2"]
|
||||
++ map (chatId: ''
|
||||
${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
|
||||
${pkgs.curl}/bin/curl -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
|
||||
-d chat_id="${chatId}" \
|
||||
-d text="$QUOTE" ${
|
||||
lib.strings.optionalString (bot.parseMode != null)
|
||||
"-d parse_mode=${bot.parseMode}"
|
||||
}
|
||||
} | ${pkgs.jq}/bin/jq -e .ok
|
||||
'')
|
||||
bot.chatIds
|
||||
++ ["fi"]);
|
||||
|
||||
Reference in New Issue
Block a user