Skip to content

xinux-org/demo-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cc86e02 Β· Mar 15, 2025

History

4 Commits
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025
Mar 15, 2025

Repository files navigation

Telegram Rust Nix Template

This is a starter pack for Nix friendly Telegram bot on Rust ecosystem provided to you by Xinux Community members.

Please, after bootstrapping, rename / change all example or template keywords in template files.

Table of contents

Development

In your project root:

# Default shell (bash)
nix develop

# If you use zsh
nix develop -c $SHELL

# If it's your first time, terminal will ask you for
# Telegram bot token to set up everything necessary
# and forget about it.

# Nix shell will run bot in background on watch mode.
# However, your terminal prompt may not show, so just
# Press enter and prompt will be back.

# After entering Nix development environment,
# inside the env, you can open your editor, so
# your editor will read all $PATH and environmental
# variables

# Neovim
vim .

# VSCode
code .

# Zed Editor
zed .

Building

In your project root:

# Build in nix environment
nix build

# Execute compiled binary
./result/bin/tempbot

Deploying

WIP: This one is huge, will take some time to write.

Working productions

There are bunch of telegram bots that are using this template and are deployed & working: