nix-config/hosts/heather/tuwunel-admin.nix
mikl 741a404ba8 heather: matrix tuwunel (homeserver) + cinny + tuwunel-admin
- tuwunel arion container: ghcr.io/matrix-construct/tuwunel:v1.7.1,
  server_name=iscg.dev, allow_federation, registration via token.
  Media on Yandex Object Storage (S3) bucket iscg-tuwunel-media.
  Config (tuwunel.toml w/ s3 secret + reg token) bind-mounted from
  /var/lib/tuwunel-secrets/ (outside git, root:docker 0640).
- cinny arion container: ajbura/cinny:latest, config from
  /var/lib/tuwunel-secrets/cinny-config.json, default homeserver iscg.dev.
- tuwunel-admin systemd service: static x86_64 binary (no public docker
  image) at /var/lib/tuwunel-admin/tuwunel-admin, binds 127.0.0.1:8009.
  Caddy admin.iscg.dev terminates TLS.

Fresh install — no users/media migrated from old jul11.
2026-07-13 02:01:59 +03:00

34 lines
1.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# heather — tuwunel-admin (web admin UI for tuwunel Matrix homeserver).
#
# https://github.com/matrix-construct/tuwunel-admin (приватный репо/сборка).
# Публичного docker-образа НЕТ — это статический x86_64 бинарник, собранный
# вручную (v0.0.0). Бинарник лежит вне nix-store: /var/lib/tuwunel-admin/tuwunel-admin
# (скопирован с iscg-dev-jul11 2026-07-13). При пересоздании heather с нуля —
# перескопировать с jul11 (или заново собрать из исходников).
#
# Логинится matrix-пользователем на homeserver https://iscg.dev (см. [matrix]
# в config.toml). Чтобы UI мог выполнять admin-команды, залогиненный юзер
# должен быть server admin tuwunel (`users make-admin` через --execute).
#
# Слушает 127.0.0.1:8009 → Caddy admin.iscg.dev терминирует TLS (см. caddy.nix).
# Конфиг: /var/lib/tuwunel-admin/config.toml (вне git, root:root 0644).
{ config, pkgs, lib, ... }:
{
systemd.services.tuwunel-admin = {
description = "tuwunel-admin (Matrix admin web UI)";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "/var/lib/tuwunel-admin/tuwunel-admin --config /var/lib/tuwunel-admin/config.toml";
WorkingDirectory = "/var/lib/tuwunel-admin";
Restart = "on-failure";
RestartSec = 5;
# Бинарник статический, рут-запуск ок (биндит 127.0.0.1:8009).
User = "root";
Environment = [ "HOME=/var/lib/tuwunel-admin" ];
};
};
}