Skip to content

Commit 330c993

Browse files
committed
setup pilegram
1 parent 66dec58 commit 330c993

10 files changed

Lines changed: 122 additions & 717 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,21 @@ nodes; use an ephemeral key so retired ones auto-clean (see step 3).
6767
may suffix it (`computer-1`) until the stale one is culled; exe.dev's
6868
public share is the stable public path if that matters.
6969

70+
5. Place the Telegram gateway (pilegram) secrets — the bot token and your
71+
allow-listed Telegram user id(s) — so the `assistant-gateway` service can
72+
start. They stay out of this (public) repo and the image; the file lives
73+
under the assistant home and is backed up, so it's restored on recreation:
74+
75+
```
76+
sudo install -d -o 2001 -g 2001 -m 700 /var/lib/assistant/.config/pilegram
77+
sudo sh -c 'umask 077; printf "TELEGRAM_BOT_TOKEN=%s\nPILEGRAM_ALLOW=%s\n" "123456:AA..." "111222333" > /var/lib/assistant/.config/pilegram/env'
78+
sudo chown 2001:2001 /var/lib/assistant/.config/pilegram/env
79+
```
80+
81+
`PILEGRAM_ALLOW` is comma-separated numeric Telegram user ids. In BotFather,
82+
enable **Threaded Mode** so each Telegram topic is its own agent session. The
83+
service retries every 10s until the file exists.
84+
7085
## Configuration
7186

7287
### Backups

flake.lock

Lines changed: 47 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,28 @@
22
description = "Nix-built OCI image for exe.dev machines";
33

44
inputs = {
5-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
6-
# 25.11 atuin (18.10) is too old for a DB migrated by a newer atuin.
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
6+
# stable's atuin is older than the one that migrated the local atuin DB, so
7+
# atuin (and other fast-moving tools) pin unstable — see
8+
# hosts/macbook/home/atuin.nix and packages/unstable.nix.
79
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
810
nix-darwin = {
9-
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
11+
url = "github:nix-darwin/nix-darwin/nix-darwin-26.05";
1012
inputs.nixpkgs.follows = "nixpkgs";
1113
};
1214
home-manager = {
13-
url = "github:nix-community/home-manager/release-25.11";
15+
url = "github:nix-community/home-manager/release-26.05";
1416
inputs.nixpkgs.follows = "nixpkgs";
1517
};
1618
nixvim = {
17-
url = "github:nix-community/nixvim/nixos-25.11";
19+
url = "github:nix-community/nixvim/nixos-26.05";
1820
inputs.nixpkgs.follows = "nixpkgs";
1921
};
22+
# my pi ⇄ Telegram gateway (the assistant's bridge). Deliberately does NOT
23+
# follow our nixpkgs, even though both track 26.05: it's a hermetic flake
24+
# whose node_modules is a fixed-output derivation pinned to its own nixpkgs'
25+
# bun, and repinning bun (even across 26.05 revs) would break that hash.
26+
pilegram.url = "github:ngalaiko/pilegram";
2027
};
2128

2229
outputs =

0 commit comments

Comments
 (0)