From c3742db32ee358ae24b05ae5084ac619f02e70af Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 19 Apr 2026 13:20:20 +0200 Subject: [PATCH] =?UTF-8?q?feat(phantom-ship):=20add=20shipyard=20systemd?= =?UTF-8?q?=20service=20=F0=9F=9A=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Telegram bot hub that lists mini-apps and collects feedback via ForceReply. Code deployed via rsync to /home/danny/shipyard/; token at ~danny/.secrets/telegram-bot-token-shipyard. --- nixos/hosts/phantom-ship.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/nixos/hosts/phantom-ship.nix b/nixos/hosts/phantom-ship.nix index 4bb0de0..60668e7 100644 --- a/nixos/hosts/phantom-ship.nix +++ b/nixos/hosts/phantom-ship.nix @@ -167,6 +167,34 @@ in }; }; + # Shipyard — Telegram bot that lists Danny's mini-apps and collects feedback. + # Code deployed out-of-band via rsync to /home/danny/shipyard/ + # (staying in-tree in ~/python-projects/26_shipyard/ until spun out to its own repo). + # Bot token (not in repo): ~danny/.secrets/telegram-bot-token-shipyard + # Data (feedback.jsonl, pointer cache): ~danny/.local/share/shipyard/ + systemd.services.shipyard = let + pythonEnv = pkgs.python3.withPackages (ps: with ps; [ + python-telegram-bot + httpx + ]); + in { + description = "Shipyard Telegram bot (mini-app launcher + feedback)"; + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; + wantedBy = [ "multi-user.target" ]; + path = [ pythonEnv ]; + environment = { + SHIPYARD_BOT_TOKEN_FILE = "/home/danny/.secrets/telegram-bot-token-shipyard"; + }; + serviceConfig = { + WorkingDirectory = "/home/danny/shipyard"; + ExecStart = "${pythonEnv}/bin/python bot.py"; + Restart = "on-failure"; + RestartSec = 10; + User = "danny"; + }; + }; + # Auto-rebuild service/timer + safe.directory provided by the # shared dotfiles-rebuild NixOS module (see nixos/modules/dotfiles-rebuild.nix). }