mirror of
https://github.com/kmein/niveum
synced 2026-03-21 12:21:08 +01:00
chore(catullus): split up telegram-bots
This commit is contained in:
20
systems/catullus/telegram-bots/proverb.nix
Normal file
20
systems/catullus/telegram-bots/proverb.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
proverb-bot-package = pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "proverb-pro";
|
||||
rev = "f4201c5419354377a26b7f7873368683efbea417";
|
||||
sha256 = "1ixffmxy3sxy2if7fd44ps451rds14hnz4d0x9nkh8lzshqk6v4y";
|
||||
};
|
||||
telegram-proverb = pkgs.python3Packages.callPackage proverb-bot-package {};
|
||||
in
|
||||
{
|
||||
systemd.services.telegram-proverb = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Telegram bot for generating inspiring but useless proverbs";
|
||||
environment.TELEGRAM_PROVERB_TOKEN = lib.strings.fileContents <secrets/telegram/proverb.token>;
|
||||
enable = true;
|
||||
script = ''${telegram-proverb}/bin/proverb_bot.py'';
|
||||
serviceConfig.Restart = "always";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user