Compare commits
2
Commits
8f52714343
...
ba302a8a00
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba302a8a00 | ||
|
|
845af0e897 |
@@ -1,9 +1,41 @@
|
|||||||
{config, ...}: {
|
{
|
||||||
# T3 Code desktop server: reachable from NetBird mesh peers only.
|
config,
|
||||||
networking.firewall.interfaces.wt0.allowedTCPPorts = [
|
pkgs,
|
||||||
(config.m3ta.ports.get "t3code")
|
...
|
||||||
];
|
}: let
|
||||||
|
port = config.m3ta.ports.get "t3code";
|
||||||
|
cockpitUser = "m3tam3re";
|
||||||
|
netbirdIp = "100.81.73.194";
|
||||||
|
in {
|
||||||
|
# T3 Code server: reachable from NetBird mesh peers only. It owns ~/.t3, so
|
||||||
|
# the desktop app must connect as a client with its local environment off.
|
||||||
|
systemd.services.t3code = {
|
||||||
|
description = "T3 Code server";
|
||||||
|
# Binding fails until NetBird has assigned the address; Restart retries.
|
||||||
|
after = ["netbird.service"];
|
||||||
|
wants = ["netbird.service"];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
# Advertise the mesh name: T3 otherwise picks the firewalled LAN address.
|
serviceConfig = {
|
||||||
environment.sessionVariables.T3CODE_DESKTOP_LAN_HOST = "m3-kratos.v.m3ta.dev";
|
User = cockpitUser;
|
||||||
|
Group = "users";
|
||||||
|
WorkingDirectory = "/home/${cockpitUser}";
|
||||||
|
ExecStart = "${pkgs.llm-agents.t3code}/bin/t3 serve --host ${netbirdIp}";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "5";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
T3CODE_PORT = toString port;
|
||||||
|
HOME = "/home/${cockpitUser}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# The harnesses come from the user's profile, not from the service.
|
||||||
|
path = [
|
||||||
|
"/etc/profiles/per-user/${cockpitUser}"
|
||||||
|
"/run/current-system/sw"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.interfaces.wt0.allowedTCPPorts = [port];
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user