refactor(m3-kratos): use the T3 Code module from m3ta-home

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sascha KönigandClaude Opus 5.5 committed 2026-11-02 08:02:07 +01:00
1 parent ba302a8a00
commit aef9d84d61
3 files changed
+7 -131

No files matched your search

+2 -1
View File
@@ -13,6 +13,7 @@
./ports.nix
./users
inputs.home-manager.nixosModules.home-manager
inputs.m3ta-home.nixosModules.t3code
];
environment.pathsToLink = ["/share/xdg-desktop-portal" "/share/applications"];
@@ -50,7 +51,7 @@
# overlays/default.nix.
inputs.llm-agents.overlays.shared-nixpkgs
# Wraps pkgs.llm-agents.t3code* with the agents' m3ta-chiron identity.
outputs.overlays.t3code-agent-identity
inputs.m3ta-home.overlays.t3code-agent-identity
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
+5 -39
View File
@@ -1,41 +1,7 @@
{
config,
pkgs,
...
}: 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"];
serviceConfig = {
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"
];
{config, ...}: {
m3ta.t3code = {
enable = true;
user = "m3tam3re";
port = config.m3ta.ports.get "t3code";
};
networking.firewall.interfaces.wt0.allowedTCPPorts = [port];
}