nix-config/hosts/heather/tuwunel-admin.nix
mikl 4830425107 heather: revert tuwunel-admin to manual binary (outside nix-store)
Revert the fetchurl nix derivation. Keep the static binary at
/var/lib/tuwunel-admin/tuwunel-admin (copied from jul11, v0.0.0).
Service already runs this version on heather (nix derivation was pushed
but never deployed).
2026-07-13 02:52:19 +03:00

35 lines
1.8 KiB
Nix
Raw Permalink 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/knadh/tuwunel-admin (Rust, axum, self-contained static binary).
# Логинится matrix-пользователем на homeserver https://iscg.dev (см. [matrix]
# в config.toml). Чтобы UI мог выполнять admin-команды, залогиненный юзер
# должен быть server admin tuwunel (первый зарегистрированный = admin room member).
#
# Слушает 127.0.0.1:8009 → Caddy admin.iscg.dev терминирует TLS (см. caddy.nix).
# Конфиг: /var/lib/tuwunel-admin/config.toml (вне git, root:root 0644).
#
# Бинарь: публичного docker-образа НЕТ. Это статический x86_64 бинарник v0.0.0
# (скопирован с iscg-dev-jul11 2026-07-13), лежит ВНЕ nix-store:
# /var/lib/tuwunel-admin/tuwunel-admin
# При пересоздании heather с нуля — перескопировать с jul11 или скачать релиз
# https://github.com/knadh/tuwunel-admin/releases (v0.1.0+).
{ 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" ];
};
};
}