Compare commits

...
Author SHA1 Message Date
m3ta-chironandClaude Fable 5.1 c9f68a4361 feat(coding/agents): hand the shared MCP catalogue to Claude Code
- Move programs.mcp.servers out of agents.nix into mcp.nix so hosts that
  do not load the whole coding set (T3 Code servers) can import it alone
- Add claude-code.nix: programs.claude-code with enableMcpIntegration,
  replacing the bare llm-agents.claude-code package (would collide on
  bin/claude). home-manager delivers the catalogue as a generated plugin,
  ~/.claude/settings.json and ~/.claude.json stay writable
- ai-memory: register the session-aware Claude bridge via
  programs.claude-code.mcpServers instead of `ai-memory install-mcp`;
  activation only removes the stale user-scope entry now
- Adjust ai-memory.test.sh accordingly

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-10 20:15:24 +01:00
m3ta-chiron b63db50485 Merge branch 'master' of code.m3ta.dev:m3tam3re/m3ta-home 2026-11-05 07:59:10 +01:00
m3ta-chiron 11ddf5e00c Merge branch 'feat/t3code-environment-file' 2026-11-05 07:58:22 +01:00
m3ta-chironandClaude Opus 5.5 2187d9263d feat(t3code): add environmentFile option
Loads an optional KEY=value file (e.g. an agenix secret) as the
service's systemd EnvironmentFile. Store paths are rejected so secrets
cannot end up in the Nix store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 07:48:18 +01:00
m3ta-chiron 4e46e08e4d Merge pull request 'fix(nushell): keep loadSessionVariables off explicitly' (#8) from fix/nushell-session-variables into master 2026-11-03 18:09:08 +01:00
m3ta-chironandClaude Opus 5.5 0c509a7c90 fix(nushell): keep loadSessionVariables off explicitly
home-manager changed the default to true for stateVersion 26.11 and warns
on every host evaluation. Setting the legacy value keeps nushell's
behaviour and silences the warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:09:00 +01:00
m3ta-chiron 38d53d68c0 Merge pull request 'revert: fix(nushell): set loadSessionVariables explicitly' (#7) from revert/nushell-session-variables into master 2026-11-03 16:20:03 +01:00
m3ta-chironandClaude Opus 5.5 6f1826b96b revert: fix(nushell): set loadSessionVariables explicitly
nixos-config's home-manager pin predates the option, so every host failed
to evaluate. Set it again once that pin moves past the default change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:19:57 +01:00
m3ta-chiron e7bbc6275a Merge pull request 'fix(nushell): set loadSessionVariables explicitly' (#6) from fix/nushell-session-variables into master 2026-11-03 16:18:00 +01:00
m3ta-chironandClaude Opus 5.5 6fba804e5f fix(nushell): set loadSessionVariables explicitly
home-manager changed its default and warns on every host evaluation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:16:07 +01:00
m3ta-chiron 2a36d43d9d Merge pull request 'chore(shell): remove Fish configuration' (#5) from chore/remove-fish into master
Reviewed-on: #5
2026-11-02 12:27:44 +01:00
m3ta-chironandClaude Opus 5.5 a60a28fb9c docs(t3code): record the NetBird profile switch test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:18:08 +01:00
m3tam3re 751f93156c Merge pull request 'Feat/t3code module' (#4) from feat/t3code-module into master
Reviewed-on: #4
2026-11-02 11:01:14 +01:00
m3ta-chironandClaude Opus 5.5 04a563ee3e fix(agents): let hosts override the agent SSH key path
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:00:24 +01:00
m3ta-chironandClaude Opus 5.5 071161b6d6 feat(t3code): move agent identity overlay here, support two Gitea instances
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:00:24 +01:00
m3ta-chironandClaude Opus 5.5 f683e8bf43 feat(t3code): add NixOS module bound to the NetBird interface
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:00:24 +01:00
m3ta-chironandClaude Opus 5.5 3d4a39dc74 docs(t3code): add design and implementation plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:00:24 +01:00
m3tam3re aa9be37311 bd init: initialize beads issue tracking 2026-11-01 14:05:21 +01:00
m3ta-chironandClaude Opus 5.5 396c41d99d chore(shell): remove Fish configuration
Nushell is the only interactive shell now. base.shell.fish.enable stays as a
deprecated no-op with a warning, because AZ-NIX-CLIENTS and AZ-NIX-SERVERS
still set it and would otherwise fail to evaluate after a lock update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:23:07 +01:00
m3ta-chiron 5b192aadfe feat: +t3code 2026-10-29 08:16:53 +01:00
m3ta-chiron 3529ae5a0e chore: update flake inputs 2026-10-26 07:53:28 +01:00
m3tam3reandClaude Fable 5.1 0be1455efb docs(ai-memory): hooks read the auth-token symlink, not the config
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 14:02:51 +01:00
m3tam3reandClaude Fable 5.1 3c2fc56c43 docs(ai-memory): step-by-step rollout for AZ-LT-NIX
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 13:58:51 +01:00
m3tam3reandClaude Fable 5.1 963351200c fix(ai-memory): register Claude Code MCP as session-aware bridge
A plain HTTP entry carries no bearer; Claude Code then attempts OAuth
dynamic client registration against ai-memory and fails. The stdio
bridge reads [auth].bearer_token_file from the client config.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 13:35:41 +01:00
m3tam3re 99c5877fb3 Merge feat/ai-memory: central ai-memory client, drop Pi/babysitter 2026-10-25 13:31:18 +01:00
m3tam3reandClaude Fable 5.1 c3b51b3546 feat(coding): add ai-memory client module, drop Pi and babysitter
coding.aiMemory wires Claude Code and OpenCode2 to the central ai-memory
server: Nix owns the client config (server URL + bearer token file), the
OpenCode MCP entry, and the scope markers (home workspace plus one marker
per workspaceDirs entry); activation runs ai-memory's own installers for
hooks, the Claude MCP bridge and the skills. The token never lands in a
generated file: hooks and the bridge read [auth].bearer_token_file, the
OpenCode plugin reads the data-dir auth-token symlink.

Pi (and its babysitter profile) are no longer used; LifeOS is being
removed from the hosts as well.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 12:47:09 +01:00
m3tam3reandClaude Opus 5.5 d608fb29b1 feat(agents): mirror ~/.agents/skills into ~/.claude/skills
Per-skill symlinks, refreshed on activation and via a systemd path unit
watching ~/.agents/skills (agent-lib sync). Claude's own entries are
never touched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:35:35 +02:00
m3tam3re 8a557cf4fc -buzz 2026-10-22 11:45:00 +02:00
m3ta-chiron d6bcd884c6 fix(agents): remove leftover paperclip import
Commits aa90c5b and b79a491 removed paperclip.nix and its config,
but missed the ./paperclip.nix entry in the imports list, breaking
evaluation with: path .../agents/paperclip.nix does not exist
2026-10-22 11:31:06 +02:00
m3tam3re b79a49191c -paperclip 2026-10-22 10:57:44 +02:00
m3tam3re aa90c5b780 -paperclip 2026-10-22 10:52:52 +02:00
m3tam3re d66c07b1b2 chore: flake update 2026-10-22 10:03:24 +02:00
m3tam3re 89877589db fix(dms): drop dankBatteryAlerts plugin, now builtin to DMS
dms-plugin-registry removed dankBatteryAlerts in 098a7f6 ('remove
builtin plugins') because DMS stable ships battery alerts natively
(BatteryService.qml: low/critical/charge-limit notifications).
Enabling the plugin without a registry-provided src made the
required plugins.dankBatteryAlerts.src option undefined, breaking
nixos builds that import the desktop profile.
2026-10-11 14:27:38 +02:00
m3tam3re 5c989e85dd chore: updates 2026-10-11 14:07:20 +02:00
m3tam3re 1eda130cee feat: metabase mcp 2026-10-09 03:16:39 +02:00
m3tam3re 549b8f0bb8 fix: typo 2026-10-09 03:04:44 +02:00
m3tam3re c94f3fb644 chore: some cleanup 2026-10-09 03:03:07 +02:00
m3tam3re 6c000b9d2f feat: agent-lib 2026-10-04 15:25:17 +02:00
m3tam3re 2de1ad96b9 +m3-kraos 2026-10-02 08:54:51 +02:00
m3tam3re dfe148dc68 fix(agents): drop dangling pkgs.agent-lib reference
Commit 5e91e5c removed the agent-lib flake input and home-manager module
but left a bare 'agent-lib' in home.packages, which exists in no package
namespace — breaking evaluation of every consumer profile (nix flake
check: undefined variable 'agent-lib').
2026-10-02 08:26:57 +02:00
m3ta-chiron 5e91e5c1e9 + AZ-PLT-1 2026-10-01 12:56:44 +02:00
m3tam3re 0daf6a2058 feat: new wallpaper 2026-09-28 19:01:37 +02:00
m3tam3re 6ebc58c3aa feat: new wallpaper 2026-09-28 18:37:45 +02:00
m3ta-chiron 2e75be49f4 fix(hyprland): make dms module requires detectable by DMS
DMS detects config inclusion via a static text scan (dms config
resolve-include, regex matches literal require("name") calls only).
The require_if_present wrapper hid every dms.* module from that scan,
so DMS reported included:false for all files even though Hyprland
loaded them fine (colors/binds-user/outputs were verifiably active).

Replace the wrapper with guarded single-line literal requires and add
dms.windowrules (user-managed DMS window rules, e.g. vibe-typer size
and com.danklinux.dms float) to the load list.
2026-09-28 18:13:14 +02:00
m3tam3re 9dca02a985 feat: wowup 2026-09-27 14:56:02 +02:00
m3tam3re a660e920b6 feat(agents): z.ai GLM coding plan provider + paperclip env passthrough
- opencode.nix: add zai-coding-plan provider (OpenAI-compatible coding-plan
  endpoint, apiKey via {env:ZAI_API_KEY}) with glm-5.3 (1M ctx) and
  glm-5-turbo — resolves in OpenCode itself, so Paperclip's opencode-harness
  agents can run on the GLM flat rate
- paperclip.nix: optional EnvironmentFile=%h/.config/paperclip.env so
  agents spawned by the service inherit provider keys
2026-09-25 08:19:52 +02:00
m3tam3re 800a356b66 fix(agents): enable paperclip via Install.WantedBy (HM freeform sections) 2026-09-25 08:11:35 +02:00
m3tam3re 118f324508 fix(agents): wantedBy is an attrset in home-manager, not a list 2026-09-25 08:09:35 +02:00
m3tam3re e8fb6be9cd feat(agents): declarative paperclip systemd user service
Replaces paperclip's own 'paperclipai service install' flow (self-managed
shim + cli store): ExecStart points at pkgs.llm-agents.paperclip directly,
keeping the embedded PostgreSQL on the nixpkgs build. Enabled alongside
babysitter in the coding agents set.
2026-09-25 08:08:05 +02:00
m3tam3re 4ef99db31d feat(agents): switch to opencode2, drop oh-my-openagent, add paperclip
- opencode.nix: configure programs.opencode directly for OpenCode 2
  (package llm-agents.opencode2, v2.0.16). v2 reads opencode.json and
  normalizes the v1 config format internally, so provider/permission/
  formatter keys stay valid. The m3ta-nixpkgs coding.opencode wrapper
  (v1-only, hardcodes oh-my-openagent) is no longer used.
- remove oh-my-openagent plugin and ohMyOpencodeSettings model matrix
- drop programs.opencode.tui: v2 owns cli.json at runtime and would
  re-import a managed tui.json into it on every start, clobbering
  runtime prefs
- agents.nix: opencode-desktop -> llm-agents.opencode2-desktop (2.0.16),
  add llm-agents.paperclip (control plane for AI agent teams)
- rofi: terminalCommand opencode2 %a
2026-09-25 07:43:36 +02:00
m3tam3re 5e90261036 chore: -hermes-desktop 2026-09-19 14:46:06 +02:00
m3tam3re 046df6ccfb -rofi 2026-09-18 15:00:32 +02:00
m3tam3re a7978264ba Merge pull request 'fix(hyprland): float+pin vibetyper Recording Indicator' (#3) from fix/vibetyper-hyprland-rules into master
Reviewed-on: #3
2026-09-18 14:54:36 +02:00
m3ta-chiron 78d1fa262c fix(hyprland): float+pin vibetyper Recording Indicator
Since vibetyper 1.5.x the indicator is a small bottom-center panel,
not a fullscreen overlay. Without an explicit float rule dwindle
tiles it and clips the panel to tile size (magic formatter preview,
language confirm etc. appeared cut off).
2026-09-17 06:51:12 +02:00
m3tam3re 601eae6362 fix(gaming): emulators.nix declared gamescope's option by mistake
Copy-paste slip from 7064bbe: emulators.nix declared
profiles.gaming.gamescope.enable (already declared in gamescope.nix)
while reading profiles.gaming.emulators, which was never declared.
Declare the emulators option instead.
2026-09-12 14:00:38 +02:00
m3tam3re 2de49b5204 fix(desktop): build hermes-desktop with corrected Electron 43.6.0 headers hash
Upstream hermes-agent v2026.8.31 pins sha256-f8bSb… for the
artifacts.electronjs.org v43.6.0 headers tarball. The CDN swapped
that artifact, breaking every desktop build with a fixed-output
derivation hash mismatch (specified f8bSb… vs got xDgc5…).

Local copy of upstream nix/desktop.nix with:
- verified hash for electron 43.6.0 (nix store prefetch-file)
- per-version hash map with a loud throw for unknown versions
- icon/desktop-entry paths resolved against the flake input checkout

Remove once upstream ships the corrected hash and the hermes-agent
input is bumped past that release.
2026-09-12 13:58:56 +02:00
m3tam3re 7064bbebe3 feat: emulators 2026-09-12 13:50:34 +02:00
m3tam3re 9c94b70c93 feat: emulators 2026-09-12 13:49:46 +02:00
m3tam3re afc5bc3aa6 chore: some updates 2026-09-11 17:39:29 +02:00
m3tam3re ff5fef0596 chore: hyprland keybindings 2026-09-05 09:36:29 +02:00
m3tam3re 207b794431 chore: hyprland keybindings 2026-09-05 09:28:05 +02:00
m3ta-chiron fb3e39f0ce fix: libreoffice-fresh -> libreoffice-stable (deprecated alias) 2026-08-31 11:44:58 +02:00
m3ta-chiron 9b1be8eca4 refactor(agents): consume llm-agents packages via pkgs.llm-agents namespace
numtide/llm-agents.nix's shared-nixpkgs overlay exposes everything under
pkgs.llm-agents.* — no flattening to top-level attrs anymore. Namespaced
refs fail loudly when the overlay is missing instead of silently falling
back to outdated nixpkgs attributes (opencode 0.3.x) or disappearing.

Requires the consumer's nixos-config to apply
inputs.llm-agents.overlays.shared-nixpkgs (see nixos-config
hosts/common/default.nix).
2026-08-31 11:44:22 +02:00
m3tam3re 890dc4cb2c mcp changes 2026-08-25 20:09:58 +02:00
m3ta-chiron 31d47b00e5 feat: add ansible to base cli-tools
Adds ansible + ansible-lint as an always-on base module so it is
available in both identities (private/work) and all contexts.
Disable per host via base.cliTools.ansible.enable = false.
2026-08-21 09:06:49 +02:00
m3tam3re 6a311045a4 chore: ssh changes 2026-08-16 13:44:59 +02:00
m3tam3re 808b6628c8 chore: flake update 2026-08-15 14:06:47 +02:00
m3tam3re b58b7e84d1 chore: opencode config updates 2026-08-15 13:53:22 +02:00
m3ta-chiron fbba78e358 chore: fix local repo paths 2026-08-12 10:25:49 +02:00
m3ta-chiron 38fa16eda6 chore: TC01 addr change 2026-08-12 10:24:00 +02:00
m3tam3re 33d0c85ef4 chore: ssh changes 2026-08-11 17:06:01 +02:00
m3tam3re f2cc6b59ef chore: update hyrpland/dms config 2026-08-09 09:50:45 +02:00
m3tam3re f0e98a2ac7 feat: buzz 2026-08-08 17:46:57 +02:00
m3ta-chiron 6a67324c6d fix: litelllm models 2026-08-03 11:49:56 +02:00
m3ta-chiron c90f5a5857 fix: litelllm models 2026-08-03 11:49:23 +02:00
m3ta-chiron 69082a07f2 fix: litelllm models 2026-08-03 11:34:59 +02:00
m3ta-chiron d2b39a3f2d AZ-TC-01 2026-08-03 09:12:37 +02:00
m3ta-chiron de16245929 AZ-TC-01 2026-08-03 08:44:48 +02:00
m3ta-chiron b01084482f Merge branch 'master' of code.m3ta.dev:m3tam3re/m3ta-home 2026-08-03 06:31:55 +02:00
m3ta-chiron 66b1dc72f5 fix: agent-lib-legacy repo url 2026-08-03 06:31:43 +02:00
m3tam3re 0db970c161 feat: docker-sbx 2026-08-02 16:34:20 +02:00
m3tam3re 516f9d74e0 chore: -aionui 2026-08-02 13:41:01 +02:00
m3tam3re 7926491466 feat: migrate Hyprland configuration to Lua 2026-08-01 10:53:09 +02:00
m3tam3re a9cf13abd4 feat: add some mcp servers 2026-07-30 14:50:43 +02:00
m3tam3re 4dec87ebc7 feat: okf skills 2026-07-30 14:22:13 +02:00
m3tam3re 53de70bf4f feat: okf skills 2026-07-30 14:16:33 +02:00
m3tam3re 206ee46d4f fix: basecamp rollback as new rc version does not have a source hash 2026-07-30 09:33:31 +02:00
m3tam3re 4ac8d6fb9a chore: flake update 2026-07-30 08:26:14 +02:00
m3tam3re a22ff06004 chore: flake update 2026-07-30 07:21:22 +02:00
m3tam3re acbf02c3e1 +opencode-desktop 2026-07-30 07:03:27 +02:00
m3ta-chiron 128391afb2 -zellij-ps 2026-07-28 06:49:42 +02:00
m3ta-chiron 92244b5f02 -zellij-ps 2026-07-28 06:35:01 +02:00
m3tam3re 7b3ef4a2c3 Merge branch 'master' of code.m3ta.dev:m3tam3re/m3ta-home 2026-07-25 11:45:38 +02:00
m3tam3re 2aac223e77 chore: flake update 2026-07-25 11:45:26 +02:00
m3ta-chiron 5e26e13aa7 chore: model changes for opencode 2026-07-17 07:21:35 +02:00
m3tam3re 017bf5002e fix: gstreamer 2026-07-16 18:56:09 +02:00
m3tam3re c85600a3b0 chore: skill issue 2026-07-10 15:18:06 +02:00
m3tam3re 32fdaddf7c Merge branch 'master' of code.m3ta.dev:m3tam3re/m3ta-home 2026-07-08 20:41:14 +02:00
m3tam3re 99753e18df feat: +aionui 2026-07-08 20:41:03 +02:00
m3tam3re 10876be5e6 fix: resolve eval warnings and npm prefix 2026-07-07 19:39:43 +02:00
m3tam3re 93cecb1a53 feat: herdr 2026-07-07 18:52:04 +02:00
m3ta-chiron 192b5df938 chore: gitea npm registry 2026-07-07 07:19:28 +02:00
m3ta-chiron 47fbdaaa37 chore: gitea npm registry 2026-07-07 06:51:56 +02:00
m3tam3re ed976b0e9e chore: remove hermes-desktop 2026-07-05 18:37:34 +02:00
m3ta-chiron 671ad7bb8f feat: new skills 2026-07-02 21:13:02 +02:00
m3tam3re 013f031a56 feat: talk crunch 2026-07-02 20:26:03 +02:00
m3tam3re 9f44404d94 feat: talk crunch 2026-07-02 20:24:21 +02:00
m3tam3re 2f4c5c8cba Merge pull request 'refactor: dynamic nushell secrets path via config.home.username' (#2) from feat/dynamic-secrets into master
Reviewed-on: #2
2026-07-02 19:08:43 +02:00
m3ta-chiron 7febc62f50 refactor: resolve nushell secrets path dynamically via config.home.username
Replace hardcoded 'm3tam3re-secrets' with '${config.home.username}-secrets'
so the agenix secret file resolves automatically for any user
(m3tam3re, sascha.koenig, bob, etc.).
2026-07-02 19:07:29 +02:00
m3ta-chiron 6c9d082e41 Merge branch 'master' of code.m3ta.dev:m3tam3re/m3ta-home 2026-06-30 07:22:37 +02:00
m3ta-chiron a42c196840 chore: update agent sources 2026-06-30 07:22:27 +02:00
m3tam3re 9cd60383f8 fix: vibetyper hyprland setting 2026-06-20 10:58:22 +02:00
m3tam3re 6be0ad4ea0 fix: remove deprecated matchBlocks from work profile 2026-06-20 10:51:46 +02:00
m3tam3re 0ae4996d97 chore: vibetyper rec indicator 2026-06-20 08:34:18 +02:00
m3tam3re aa249c1f31 chore: moonlander keyboard layout 2026-06-19 11:29:02 +02:00
m3tam3re 413a7d123e chore: moonlander keyboard layout 2026-06-19 06:56:48 +02:00
m3ta-chiron 57c467ef11 chore: fix opus 4.8 thinking 2026-06-15 13:01:07 +02:00
m3ta-chiron fbcf8f65e6 chore: fix opus 4.8 thinking 2026-06-15 12:59:17 +02:00
m3ta-chiron ef78590a6a chore: opus 4.8 2026-06-15 12:46:09 +02:00
m3ta-chiron 39cc27fd72 chore: hyprland monitor config import from dms 2026-06-15 11:00:32 +02:00
m3ta-chiron fe88684d9d chore: move openwork into agent context 2026-06-15 07:39:27 +02:00
m3ta-chiron 4b4221da30 fix: resolve flake lock conflict markers 2026-06-15 07:22:07 +02:00
m3ta-chiron 9be26d79cc feat: openwork 2026-06-15 07:13:29 +02:00
m3ta-chiron 2821f4b6f4 feat: openwork 2026-06-15 07:13:04 +02:00
78 changed files with 4008 additions and 1385 deletions

No files matched your search

+80
View File
@@ -0,0 +1,80 @@
---
name: beads
description: Use when working in a repository that uses bd or Beads for durable project task tracking, issue dependencies, blocker management, multi-session handoff, or shared work memory. Trigger when the user asks to find ready work, claim or close tasks, create follow-up work, inspect blockers, recover project context, or choose between local planning and persistent project tracking.
---
# Beads
Use Beads as the shared project task system. Local plans, scratch files, and personal memories are useful, but they are not the durable source of truth for project work.
## First Step
Run:
```bash
bd prime
```
If that prints nothing, check whether the repository has an active Beads workspace:
```bash
bd where
```
## Preferred Route
Use the `bd` CLI when shell access is available. It is the most compact and direct Beads interface.
## Core CLI Workflow
1. Find work:
```bash
bd ready
bd list --status=open
bd list --status=in_progress
```
2. Inspect before editing:
```bash
bd show <id>
```
3. Claim work atomically:
```bash
bd update <id> --claim
```
4. Create durable follow-up work when implementation reveals new tasks:
```bash
bd create "Short title" --description="Why this exists and what needs to be done" --type=task --priority=2
```
5. Close completed work:
```bash
bd close <id> --reason="Completed"
```
## What Belongs In Beads
Use Beads for:
- shared project tasks
- blockers and dependencies
- discovered follow-up work
- work that must survive thread reset, compaction, or handoff
- status that another person or agent should be able to resume
Use agent-local planning tools only for the current turn's execution checklist. Do not treat them as shared project state.
## Rules
- Do not create markdown TODO files as the source of truth when Beads is available.
- Do not use `bd edit`; it opens an interactive editor. Use `bd update` flags instead.
- Prefer `--json` when parsing `bd` output programmatically.
- If hooks are installed, `bd prime` may already be injected. Run it manually when context is missing.
- Do not auto-close or mutate tasks unless the work is actually complete.
+4
View File
@@ -0,0 +1,4 @@
interface:
display_name: "Beads"
short_description: "Project task tracking with bd"
default_prompt: "Use $beads to inspect ready work and manage durable project tasks."
+82
View File
@@ -0,0 +1,82 @@
# Dolt database (managed by Dolt, not git)
dolt/
embeddeddolt/
proxieddb/
# Runtime files
bd.sock
bd.sock.startlock
sync-state.json
last-touched
.exclusive-lock
# Daemon runtime (lock, log, pid)
daemon.*
# Push state (runtime, per-machine)
push-state.json
# Lock files (various runtime locks)
*.lock
# Credential key (encryption key for federation peer auth — never commit)
.beads-credential-key
# Local version tracking (prevents upgrade notification spam after git ops)
.local_version
proxied_server_client_info.json
# Worktree redirect file (contains relative path to main repo's .beads/)
# Must not be committed as paths would be wrong in other clones
redirect
# Sync state (local-only, per-machine)
# These files are machine-specific and should not be shared across clones
.sync.lock
# Workspace operation gate (internal/workspacegate): physical-root gate
# files live beside the guarded root inside .beads (e.g. dolt.gate.lock)
*.gate.lock*
export-state/
export-state.json
last_pull
# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned)
ephemeral.sqlite3
ephemeral.sqlite3-journal
ephemeral.sqlite3-wal
ephemeral.sqlite3-shm
# Dolt server management (auto-started by bd)
dolt-server.pid
dolt-server.log
dolt-server.lock
dolt-server.port
dolt-server.activity
dolt-server-config.yaml
# Debug-mode pprof artifacts (written when dolt.debug: true in config.yaml)
dolt-pprof/
# Corrupt backup directories (created by bd doctor --fix recovery)
*.corrupt.backup/
# Backup data (auto-exported JSONL, local-only)
backup/
# Per-project environment file (Dolt connection config, GH#2520)
.env
# Legacy files (from pre-Dolt versions)
*.db
*.db?*
*.db-journal
*.db-wal
*.db-shm
db.sqlite
bd.db
# NOTE: Do NOT add negation patterns here.
# They would override fork protection in .git/info/exclude.
# Config files (metadata.json, config.yaml) are tracked by git by default
# since no pattern above ignores them.
+81
View File
@@ -0,0 +1,81 @@
# Beads - AI-Native Issue Tracking
Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.
## What is Beads?
Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.
**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
## Quick Start
### Essential Commands
```bash
# Create new issues
bd create "Add user authentication"
# View all issues
bd list
# View issue details
bd show <issue-id>
# Update issue status
bd update <issue-id> --claim
bd update <issue-id> --status done
# Sync with Dolt remote
bd dolt push
```
### Working with Issues
Issues in Beads are:
- **Git-native**: Stored in Dolt database with version control and branching
- **AI-friendly**: CLI-first design works perfectly with AI coding agents
- **Branch-aware**: Issues can follow your branch workflow
- **Sync-ready**: Uses Dolt remotes for backup and team sharing
## Why Beads?
✨ **AI-Native Design**
- Built specifically for AI-assisted development workflows
- CLI-first interface works seamlessly with AI coding agents
- No context switching to web UIs
🚀 **Developer Focused**
- Issues live in your repo, right next to your code
- Works offline, syncs when you push
- Fast, lightweight, and stays out of your way
🔧 **Git Integration**
- Dolt-native sync via bd dolt push / bd dolt pull
- Branch-aware issue tracking
- Dolt-native three-way merge resolution
## Get Started with Beads
Try Beads in your own projects:
```bash
# Install Beads
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
# Initialize in your repo
bd init
# Create your first issue
bd create "Try out Beads"
```
## Learn More
- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
- **Quick Start Guide**: Run `bd quickstart`
- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)
---
*Beads: Issue tracking that moves at the speed of thought* ⚡
+77
View File
@@ -0,0 +1,77 @@
# Beads Configuration File
# This file configures default behavior for all bd commands in this repository
# All settings can also be set via environment variables (BD_* prefix)
# or overridden with command-line flags
# Issue prefix for this repository (used by bd init)
# If not set, bd init will auto-detect from directory name
# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
# issue-prefix: ""
# Use no-db mode: JSONL-only, no Dolt database
# When true, .beads/issues.jsonl is the only local store
# no-db: false
# Enable JSON output by default
# json: false
# Feedback title formatting for mutating commands (create/update/close/dep/edit)
# 0 = hide titles, N > 0 = truncate to N characters
# output:
# title-length: 255
# Default actor for audit trails (overridden by BEADS_ACTOR or --actor)
# actor: ""
# Optional JSONL sidecar for explicit agent/tool interaction audit records.
# Issue history is always recorded in the database and is visible with
# bd history <id> --events; this only controls .beads/interactions.jsonl.
# audit:
# enabled: false
# Export events (audit trail) to .beads/events.jsonl on each flush/sync
# When enabled, new events are appended incrementally using a high-water mark.
# Use 'bd export --events' to trigger manually regardless of this setting.
# events-export: false
# Multi-repo configuration (experimental - bd-307)
# Allows hydrating from multiple repositories and routing writes to the correct database
# repos:
# primary: "." # Primary repo (where this database lives)
# additional: # Additional repos to hydrate from (read-only)
# - ~/beads-planning # Personal planning repo
# - ~/work-planning # Work planning repo
# Dolt-native backup (periodic backup for off-machine recovery)
# This is full database backup only. Cross-machine sync uses Dolt remotes.
# backup:
# enabled: false # Disable auto-backup entirely
# interval: 15m # Minimum time between auto-backups
# git-push: false # Disable git push (backup locally only)
# git-repo: "" # Separate git repo for backups (default: project repo)
# Optional JSONL auto-export for viewers, interchange, and issue-level migration.
# Disabled by default; enable only when an integration needs fresh .beads/issues.jsonl.
# Use relative paths under .beads/ for JSONL import/export filenames.
# export:
# auto: false
# path: issues.jsonl
# interval: 60s
# git-add: false
# import:
# path: issues.jsonl
# Integration settings (access with 'bd config get/set')
# Non-secret keys (stored in the database):
# - jira.url, jira.project
# - linear.team_id
# - github.org, github.repo
#
# Secret keys (stored in this file but prefer env vars to avoid git exposure):
# - linear.api_key → use LINEAR_API_KEY env var instead
# - github.token → use GITHUB_TOKEN env var instead
sync:
remote: "git+ssh://gitea@code.m3ta.dev/m3tam3re/m3ta-home.git"
export:
auto: true
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.3.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
case "$_bd_timeout" in
*[!0-9]*|'') _bd_timeout_invalid=1 ;;
*[1-9]*) _bd_timeout_invalid=0 ;;
*) _bd_timeout_invalid=1 ;;
esac
if [ "$_bd_timeout_invalid" -eq 1 ]; then
echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds"
_bd_timeout=300
fi
_bd_timeout_backend=none
_bd_timeout_command=
for _bd_timeout_candidate in timeout gtimeout; do
if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then
if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then
case "$_bd_timeout_version" in
"timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;;
esac
fi
fi
done
if [ -n "$_bd_timeout_command" ]; then
_bd_timeout_backend=coreutils
if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run post-checkout "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
elif command -v perl >/dev/null 2>&1; then
_bd_timeout_backend=perl
if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run post-checkout "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
else
echo >&2 "beads: hook 'post-checkout' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
if bd hooks run post-checkout "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
fi
if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then
echo >&2 "beads: hook 'post-checkout' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ "$_bd_exit" -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'post-checkout'"
_bd_exit=0
fi
if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi
fi
# --- END BEADS INTEGRATION v1.3.2 ---
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.3.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
case "$_bd_timeout" in
*[!0-9]*|'') _bd_timeout_invalid=1 ;;
*[1-9]*) _bd_timeout_invalid=0 ;;
*) _bd_timeout_invalid=1 ;;
esac
if [ "$_bd_timeout_invalid" -eq 1 ]; then
echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds"
_bd_timeout=300
fi
_bd_timeout_backend=none
_bd_timeout_command=
for _bd_timeout_candidate in timeout gtimeout; do
if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then
if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then
case "$_bd_timeout_version" in
"timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;;
esac
fi
fi
done
if [ -n "$_bd_timeout_command" ]; then
_bd_timeout_backend=coreutils
if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run post-merge "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
elif command -v perl >/dev/null 2>&1; then
_bd_timeout_backend=perl
if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run post-merge "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
else
echo >&2 "beads: hook 'post-merge' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
if bd hooks run post-merge "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
fi
if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then
echo >&2 "beads: hook 'post-merge' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ "$_bd_exit" -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'post-merge'"
_bd_exit=0
fi
if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi
fi
# --- END BEADS INTEGRATION v1.3.2 ---
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.3.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
case "$_bd_timeout" in
*[!0-9]*|'') _bd_timeout_invalid=1 ;;
*[1-9]*) _bd_timeout_invalid=0 ;;
*) _bd_timeout_invalid=1 ;;
esac
if [ "$_bd_timeout_invalid" -eq 1 ]; then
echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds"
_bd_timeout=300
fi
_bd_timeout_backend=none
_bd_timeout_command=
for _bd_timeout_candidate in timeout gtimeout; do
if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then
if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then
case "$_bd_timeout_version" in
"timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;;
esac
fi
fi
done
if [ -n "$_bd_timeout_command" ]; then
_bd_timeout_backend=coreutils
if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run pre-commit "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
elif command -v perl >/dev/null 2>&1; then
_bd_timeout_backend=perl
if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run pre-commit "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
else
echo >&2 "beads: hook 'pre-commit' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
if bd hooks run pre-commit "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
fi
if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then
echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ "$_bd_exit" -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'pre-commit'"
_bd_exit=0
fi
if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi
fi
# --- END BEADS INTEGRATION v1.3.2 ---
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.3.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
case "$_bd_timeout" in
*[!0-9]*|'') _bd_timeout_invalid=1 ;;
*[1-9]*) _bd_timeout_invalid=0 ;;
*) _bd_timeout_invalid=1 ;;
esac
if [ "$_bd_timeout_invalid" -eq 1 ]; then
echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds"
_bd_timeout=300
fi
_bd_timeout_backend=none
_bd_timeout_command=
for _bd_timeout_candidate in timeout gtimeout; do
if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then
if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then
case "$_bd_timeout_version" in
"timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;;
esac
fi
fi
done
if [ -n "$_bd_timeout_command" ]; then
_bd_timeout_backend=coreutils
if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run pre-push "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
elif command -v perl >/dev/null 2>&1; then
_bd_timeout_backend=perl
if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run pre-push "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
else
echo >&2 "beads: hook 'pre-push' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
if bd hooks run pre-push "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
fi
if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then
echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ "$_bd_exit" -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'pre-push'"
_bd_exit=0
fi
if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi
fi
# --- END BEADS INTEGRATION v1.3.2 ---
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.3.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
case "$_bd_timeout" in
*[!0-9]*|'') _bd_timeout_invalid=1 ;;
*[1-9]*) _bd_timeout_invalid=0 ;;
*) _bd_timeout_invalid=1 ;;
esac
if [ "$_bd_timeout_invalid" -eq 1 ]; then
echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds"
_bd_timeout=300
fi
_bd_timeout_backend=none
_bd_timeout_command=
for _bd_timeout_candidate in timeout gtimeout; do
if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then
if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then
case "$_bd_timeout_version" in
"timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;;
esac
fi
fi
done
if [ -n "$_bd_timeout_command" ]; then
_bd_timeout_backend=coreutils
if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run prepare-commit-msg "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
elif command -v perl >/dev/null 2>&1; then
_bd_timeout_backend=perl
if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run prepare-commit-msg "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
else
echo >&2 "beads: hook 'prepare-commit-msg' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
if bd hooks run prepare-commit-msg "$@"; then
_bd_exit=0
else
_bd_exit=$?
fi
fi
if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then
echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ "$_bd_exit" -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'"
_bd_exit=0
fi
if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi
fi
# --- END BEADS INTEGRATION v1.3.2 ---
+7
View File
@@ -0,0 +1,7 @@
{
"database": "dolt",
"backend": "dolt",
"dolt_mode": "embedded",
"dolt_database": "m3ta_home",
"project_id": "1a47a19e-9056-4cd2-8199-2ff7dbb4cb01"
}
+15
View File
@@ -0,0 +1,15 @@
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"command": "bd prime --hook-json",
"type": "command"
}
],
"matcher": ""
}
]
}
}
+2
View File
@@ -0,0 +1,2 @@
[features]
hooks = true
+51
View File
@@ -0,0 +1,51 @@
{
"hooks": {
"PostCompact": [
{
"hooks": [
{
"command": "bd codex-hook PostCompact",
"statusMessage": "Scheduling Beads context refresh",
"type": "command"
}
],
"matcher": "manual|auto"
}
],
"PreCompact": [
{
"hooks": [
{
"command": "bd codex-hook PreCompact",
"statusMessage": "Checking Beads context",
"type": "command"
}
],
"matcher": "manual|auto"
}
],
"SessionStart": [
{
"hooks": [
{
"command": "bd codex-hook SessionStart",
"statusMessage": "Loading Beads context",
"type": "command"
}
],
"matcher": "startup|resume|clear"
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"command": "bd codex-hook UserPromptSubmit",
"statusMessage": "Refreshing Beads context",
"type": "command"
}
]
}
]
}
}
+20
View File
@@ -0,0 +1,20 @@
{
"hooks": {
"postToolUse": [
{
"command": "bd cursor-hook postToolUse"
}
],
"preCompact": [
{
"command": "bd cursor-hook preCompact"
}
],
"sessionStart": [
{
"command": "bd cursor-hook sessionStart"
}
]
},
"version": 1
}
+67
View File
@@ -0,0 +1,67 @@
---
alwaysApply: true
---
<!-- BEGIN BEADS INTEGRATION -->
<!-- Auto-generated by 'bd setup cursor'. Content between these markers is managed by bd. -->
# Beads Issue Tracking
This project uses [Beads (bd)](https://github.com/gastownhall/beads) for issue tracking.
## Core Rules
- Track ALL work in bd (never use markdown TODOs or comment-based task lists)
- Use `bd ready` to find available work
- Use `bd create` to track new issues/tasks/bugs
- Treat commit, push, and Dolt remote sync as policy-controlled handoff actions
- Run `bd prime` for complete workflow context (SSOT for operational commands)
- Default to conservative git authority: report status and proposed commands unless the user, orchestrator, or repository profile explicitly authorizes commit/sync/push
## Quick Reference
```bash
bd prime # Load complete workflow context (SSOT)
bd ready # Show issues ready to work (no blockers)
bd list --status=open # List all open issues
bd create "title" -t task -p 2 # Create new issue
bd update <id> --claim # Claim work atomically
bd unclaim <id> # Release stuck issue (agent crashed)
bd close <id> # Mark complete
bd dep add <issue> <depends-on> # Add dependency
bd dolt push # Sync with remote when authorized
```
## Workflow
1. Check for ready work: `bd ready`
2. Claim an issue atomically: `bd update <id> --claim`
3. Do the work
4. Mark complete: `bd close <id>`
5. Handoff: report changed files, validation, issue status, and any proposed commit/sync/push commands
## Issue Types
- `bug` - Something broken
- `feature` - New functionality
- `task` - Work item (tests, docs, refactoring)
- `epic` - Large feature with subtasks
- `chore` - Maintenance (dependencies, tooling)
## Priorities
- `0` - Critical (security, data loss, broken builds)
- `1` - High (major features, important bugs)
- `2` - Medium (default, nice-to-have)
- `3` - Low (polish, optimization)
- `4` - Backlog (future ideas)
## Context Loading
Run `bd prime` to get complete workflow documentation in AI-optimized format.
`bd prime` is the single source of truth for operational commands and session workflow.
For detailed docs: see AGENTS.md, the beads quickstart
(https://github.com/gastownhall/beads/blob/main/docs/getting-started/quickstart.md), or run `bd --help`
<!-- END BEADS INTEGRATION -->
+7
View File
@@ -1,2 +1,9 @@
.direnv .direnv
.pi-lens .pi-lens
# Beads / Dolt files (added by bd init)
.dolt/
*.db
.beads-credential-key
.beads/proxieddb/
*.gate.lock*
+128
View File
@@ -0,0 +1,128 @@
# Agent Instructions
This project uses **bd** (beads) for issue tracking. Run `bd prime` for full workflow context.
> **Architecture in one line:** Issues live in a local Dolt database
> (`.beads/dolt/`); cross-machine sync uses `bd dolt push/pull` (a
> git-compatible protocol), stored under `refs/dolt/data` on your git
> remote — separate from `refs/heads/*` where your code lives.
> `.beads/issues.jsonl` is a passive export, not the wire protocol.
>
> See [sync-concepts](https://github.com/gastownhall/beads/blob/main/docs/core-concepts/sync-concepts.md)
> for the one-screen overview and anti-patterns (don't treat JSONL as the
> source of truth; don't `bd import` during normal operation; don't
> reach for third-party Dolt hosting before trying the default).
## Quick Reference
```bash
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work atomically
bd close <id> # Complete work
bd dolt push # Push beads data to remote
```
## Non-Interactive Shell Commands
**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts.
Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input.
**Use these forms instead:**
```bash
# Force overwrite without prompting
cp -f source dest # NOT: cp source dest
mv -f source dest # NOT: mv source dest
rm -f file # NOT: rm file
# For recursive operations
rm -rf directory # NOT: rm -r directory
cp -rf source dest # NOT: cp -r source dest
```
**Other commands that may prompt:**
- `scp` - use `-o BatchMode=yes` for non-interactive
- `ssh` - use `-o BatchMode=yes` to fail instead of prompting
- `apt-get` - use `-y` flag
- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var
<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:46cd31e7 -->
## Beads Issue Tracker
This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.
### Quick Reference
```bash
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work
bd close <id> # Complete work
```
### Rules
- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
- Run `bd prime` for detailed command reference and session close protocol
- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files
**Architecture in one line:** issues live in a local Dolt DB; sync uses `refs/dolt/data` on your git remote; `.beads/issues.jsonl` is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/core-concepts/sync-concepts.md for details and anti-patterns.
## Agent Context Profiles
The managed Beads block is task-tracking guidance, not permission to override repository, user, or orchestrator instructions.
- **Conservative (default)**: Use `bd` for task tracking. Do not run git commits, git pushes, or Dolt remote sync unless explicitly asked. At handoff, report changed files, validation, and suggested next commands.
- **Minimal**: Keep tool instruction files as pointers to `bd prime`; use the same conservative git policy unless active instructions say otherwise.
- **Team-maintainer**: Only when the repository explicitly opts in, agents may close beads, run quality gates, commit, and push as part of session close. A current "do not commit" or "do not push" instruction still wins.
## Session Completion
This protocol applies when ending a Beads implementation workflow. It is subordinate to explicit user, repository, and orchestrator instructions.
1. **File issues for remaining work** - Create beads for anything that needs follow-up
2. **Run quality gates** (if code changed) - Tests, linters, builds
3. **Update issue status** - Close finished work, update in-progress items
4. **Handle git/sync by active profile**:
```bash
# Conservative/minimal/default: report status and proposed commands; wait for approval.
git status
# Team-maintainer opt-in only, unless current instructions forbid it:
git pull --rebase
bd dolt push
git push
git status
```
5. **Hand off** - Summarize changes, validation, issue status, and any blocked sync/commit/push step
**Critical rules:**
- Explicit user or orchestrator instructions override this Beads block.
- Do not commit or push without clear authority from the active profile or the current user request.
- If a required sync or push is blocked, stop and report the exact command and error.
<!-- END BEADS INTEGRATION -->
<!-- BEGIN BEADS CODEX SETUP: generated by bd setup codex -->
## Beads Issue Tracker
Use Beads (`bd`) for durable task tracking in repositories that include it. Use the `beads` skill at `.agents/skills/beads/SKILL.md` (project install) or `~/.agents/skills/beads/SKILL.md` (global install) for Beads workflow guidance, then use the `bd` CLI for issue operations.
### Quick Reference
```bash
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work
bd close <id> # Complete work
bd prime # Refresh Beads context
```
### Rules
- Use `bd` for all task tracking; do not create markdown TODO lists.
- Run `bd prime` when Beads context is missing or stale. Codex 0.129.0+ can load Beads context automatically through native hooks; use `/hooks` to inspect or toggle them.
- Keep persistent project memory in Beads via `bd remember`; do not create ad hoc memory files.
**Architecture in one line:** issues live in a local Dolt DB; sync uses `refs/dolt/data` on your git remote; `.beads/issues.jsonl` is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/core-concepts/sync-concepts.md for details and anti-patterns.
<!-- END BEADS CODEX SETUP -->
+77
View File
@@ -0,0 +1,77 @@
# Project Instructions for AI Agents
This file provides instructions and context for AI coding agents working on this project.
<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:1105d646 -->
## Beads Issue Tracker
This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.
### Quick Reference
```bash
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work
bd close <id> # Complete work
```
### Rules
- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
- Run `bd prime` for detailed command reference and session close protocol
- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files
**Architecture in one line:** issues live in a local Dolt DB; sync uses `refs/dolt/data` on your git remote; `.beads/issues.jsonl` is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/core-concepts/sync-concepts.md for details and anti-patterns.
## Agent Context Profiles
The managed Beads block is task-tracking guidance, not permission to override repository, user, or orchestrator instructions.
- **Conservative (default)**: Use `bd` for task tracking. Do not run git commits, git pushes, or Dolt remote sync unless explicitly asked. At handoff, report changed files, validation, and suggested next commands.
- **Minimal**: Keep tool instruction files as pointers to `bd prime`; use the same conservative git policy unless active instructions say otherwise.
- **Team-maintainer**: Only when the repository explicitly opts in, agents may close beads, run quality gates, commit, and push as part of session close. A current "do not commit" or "do not push" instruction still wins.
## Session Completion
This protocol applies when ending a Beads implementation workflow. It is subordinate to explicit user, repository, and orchestrator instructions.
1. **File issues for remaining work** - Create beads for anything that needs follow-up
2. **Run quality gates** (if code changed) - Tests, linters, builds
3. **Update issue status** - Close finished work, update in-progress items
4. **Handle git/sync by active profile**:
```bash
# Conservative/minimal/default: report status and proposed commands; wait for approval.
git status
# Team-maintainer opt-in only, unless current instructions forbid it:
git pull --rebase
git push
git status
```
5. **Hand off** - Summarize changes, validation, issue status, and any blocked sync/commit/push step
**Critical rules:**
- Explicit user or orchestrator instructions override this Beads block.
- Do not commit or push without clear authority from the active profile or the current user request.
- If a required sync or push is blocked, stop and report the exact command and error.
<!-- END BEADS INTEGRATION -->
## Build & Test
_Add your build and test commands here_
```bash
# Example:
# npm install
# npm test
```
## Architecture Overview
_Add a brief overview of your project architecture_
## Conventions & Patterns
_Add your project-specific conventions here_
+2 -2
View File
@@ -142,7 +142,7 @@ If you bring a work NixOS machine into your fleet, you can use the same `m3ta-ho
This gives you: This gives you:
- Your familiar shell setup (fish, starship, nushell) - Your familiar shell setup (starship, nushell)
- Your CLI tools (fzf, bat, eza, zoxide, etc.) - Your CLI tools (fzf, bat, eza, zoxide, etc.)
- Your editor configs (neovim, zed) - Your editor configs (neovim, zed)
- Work git identity and SSH configuration automatically - Work git identity and SSH configuration automatically
@@ -161,7 +161,7 @@ Every module in m3ta-home has an `enable` option. Base modules default to `true`
### Available Flags ### Available Flags
``` ```
base.shell.fish.enable # Fish shell base.cliTools.ansible.enable # Ansible (config rollout to servers)
base.shell.nushell.enable # Nushell base.shell.nushell.enable # Nushell
base.shell.starship.enable # Starship prompt base.shell.starship.enable # Starship prompt
base.cliTools.fzf.enable # Fuzzy finder base.cliTools.fzf.enable # Fuzzy finder
+346 -57
View File
@@ -533,6 +533,17 @@
}, },
"path": "skills/changelog" "path": "skills/changelog"
}, },
"crunch-jobs": {
"entry": "skills/crunch-jobs/SKILL.md",
"licenseFiles": [],
"metadata": {
"description": "Use when: (1) The user asks to be reminded at a specific time, (2) Schedule recurring notifications, (3) Set up AI-powered scheduled jobs (summarize, review, report), (4) Run custom pipeline scripts on a schedule with voice output. Triggers: remind me, erinnere mich, schedule, cron, daily, weekly, täglich, jeden Montag, crunch, talk at, notify me at, voice reminder.",
"name": "crunch-jobs",
"requires": [],
"tags": []
},
"path": "skills/crunch-jobs"
},
"doc-translator": { "doc-translator": {
"entry": "skills/doc-translator/SKILL.md", "entry": "skills/doc-translator/SKILL.md",
"licenseFiles": [], "licenseFiles": [],
@@ -555,6 +566,17 @@
}, },
"path": "skills/excalidraw" "path": "skills/excalidraw"
}, },
"m3ta-brain": {
"entry": "skills/m3ta-brain/SKILL.md",
"licenseFiles": [],
"metadata": {
"description": "Shared Obsidian vault for human-agent collaboration. Use when: (1) Loading project context at session start (auto-recall), (2) Writing session summaries, decisions, project updates, or learning notes, (3) Searching for past decisions or project state, (4) Running nightly/weekly digest passes, (5) Creating or updating person profiles, (6) Any reference to 'the vault', 'shared brain', 'our context', 'what did we decide'. Triggers: m3ta-brain, shared brain, vault, session summary, decision note, project update, memory candidate, brain vault, auto-recall, digest, nightly pass.",
"name": "m3ta-brain",
"requires": [],
"tags": []
},
"path": "skills/m3ta-brain"
},
"mem0-memory": { "mem0-memory": {
"entry": "skills/mem0-memory/SKILL.md", "entry": "skills/mem0-memory/SKILL.md",
"licenseFiles": [], "licenseFiles": [],
@@ -643,6 +665,17 @@
}, },
"path": "skills/reflection" "path": "skills/reflection"
}, },
"shared-brain-vault": {
"entry": "skills/shared-brain-vault/SKILL.md",
"licenseFiles": [],
"metadata": {
"description": "Build and maintain a Git-synced Obsidian vault as shared working memory between user and AI agents. Use when: (1) Writing session summaries or project updates, (2) Recording decisions or learnings, (3) Adding people/profiles to the vault, (4) Populating or restructuring the vault, (5) Setting up multi-agent vault access, (6) Answering 'what did we decide' or 'where do we stand on X'. Triggers: 'shared brain', 'm3ta-brain', 'session summary', 'vault update', 'decision note', 'project status', 'what did we decide'.",
"name": "shared-brain-vault",
"requires": [],
"tags": []
},
"path": "skills/shared-brain-vault"
},
"skill-creator": { "skill-creator": {
"entry": "skills/skill-creator/SKILL.md", "entry": "skills/skill-creator/SKILL.md",
"licenseFiles": [], "licenseFiles": [],
@@ -665,6 +698,17 @@
}, },
"path": "skills/systematic-debugging" "path": "skills/systematic-debugging"
}, },
"voice-notify": {
"entry": "skills/voice-notify/SKILL.md",
"licenseFiles": [],
"metadata": {
"description": "Use when: (1) A long-running task (build, test, migration, cruncher job) completes, (2) The user asks to be notified audibly, (3) An agent finishes delegated work and should announce results, (4) Important errors or completions need immediate attention. Triggers: talk, voice, notify, audio, abbrechen, notify me, let me know when done, cruncher, job complete.",
"name": "voice-notify",
"requires": [],
"tags": []
},
"path": "skills/voice-notify"
},
"xlsx": { "xlsx": {
"entry": "skills/xlsx/SKILL.md", "entry": "skills/xlsx/SKILL.md",
"licenseFiles": [], "licenseFiles": [],
@@ -679,9 +723,9 @@
}, },
"tools": {} "tools": {}
}, },
"narHash": "sha256:640f5c15e9124526564a5438952c3231d9fa3cbab6a4e6b1cecdf4cd280c7847", "narHash": "sha256:c119e6197eb556c9c00a13a88d2e8f42d740c724262b2b0e2ac6fb05456fe621",
"ref": null, "ref": null,
"rev": "920c00313ae242bd93275c30131b9ab1e52ee2fb", "rev": "83284d752d2ac325d4bf3ab7b38acad1c2fffe3a",
"root": ".", "root": ".",
"type": "git", "type": "git",
"url": "https://code.m3ta.dev/m3tam3re/AGENTS", "url": "https://code.m3ta.dev/m3tam3re/AGENTS",
@@ -726,18 +770,70 @@
"agents": {}, "agents": {},
"prompts": {}, "prompts": {},
"skills": { "skills": {
"caveman": { "ask-matt": {
"entry": "skills/productivity/caveman/SKILL.md", "entry": "skills/engineering/ask-matt/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": ">", "description": "Ask which skill or flow fits your situation. A router over the skills in this repo.",
"name": "caveman", "name": "ask-matt",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/productivity/caveman" "path": "skills/engineering/ask-matt"
},
"batch-grill-me": {
"entry": "skills/in-progress/batch-grill-me/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "A relentless interview that asks every frontier question at once, round by round.",
"name": "batch-grill-me",
"requires": [],
"tags": []
},
"path": "skills/in-progress/batch-grill-me"
},
"claude-handoff": {
"entry": "skills/in-progress/claude-handoff/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Hand the current conversation off to a fresh background agent that picks up the work immediately.",
"name": "claude-handoff",
"requires": [],
"tags": []
},
"path": "skills/in-progress/claude-handoff"
},
"code-review": {
"entry": "skills/engineering/code-review/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\".",
"name": "code-review",
"requires": [],
"tags": []
},
"path": "skills/engineering/code-review"
},
"codebase-design": {
"entry": "skills/engineering/codebase-design/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.",
"name": "codebase-design",
"requires": [],
"tags": []
},
"path": "skills/engineering/codebase-design"
}, },
"design-an-interface": { "design-an-interface": {
"entry": "skills/deprecated/design-an-interface/SKILL.md", "entry": "skills/deprecated/design-an-interface/SKILL.md",
@@ -752,18 +848,31 @@
}, },
"path": "skills/deprecated/design-an-interface" "path": "skills/deprecated/design-an-interface"
}, },
"diagnose": { "diagnosing-bugs": {
"entry": "skills/engineering/diagnose/SKILL.md", "entry": "skills/engineering/diagnosing-bugs/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says \"diagnose this\" / \"debug this\", reports a bug, says something is broken/throwing/failing, or describes a performance regression.", "description": "Diagnosis loop for hard bugs and performance regressions. Use when the user says \"diagnose\"/\"debug this\", or reports something broken/throwing/failing/slow.",
"name": "diagnose", "name": "diagnosing-bugs",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/engineering/diagnose" "path": "skills/engineering/diagnosing-bugs"
},
"domain-modeling": {
"entry": "skills/engineering/domain-modeling/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.",
"name": "domain-modeling",
"requires": [],
"tags": []
},
"path": "skills/engineering/domain-modeling"
}, },
"edit-article": { "edit-article": {
"entry": "skills/personal/edit-article/SKILL.md", "entry": "skills/personal/edit-article/SKILL.md",
@@ -797,7 +906,7 @@
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions \"grill me\".", "description": "A relentless interview to sharpen a plan or design.",
"name": "grill-me", "name": "grill-me",
"requires": [], "requires": [],
"tags": [] "tags": []
@@ -810,13 +919,26 @@
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.", "description": "A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.",
"name": "grill-with-docs", "name": "grill-with-docs",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/engineering/grill-with-docs" "path": "skills/engineering/grill-with-docs"
}, },
"grilling": {
"entry": "skills/productivity/grilling/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.",
"name": "grilling",
"requires": [],
"tags": []
},
"path": "skills/productivity/grilling"
},
"handoff": { "handoff": {
"entry": "skills/productivity/handoff/SKILL.md", "entry": "skills/productivity/handoff/SKILL.md",
"licenseFiles": [ "licenseFiles": [
@@ -830,19 +952,45 @@
}, },
"path": "skills/productivity/handoff" "path": "skills/productivity/handoff"
}, },
"implement": {
"entry": "skills/engineering/implement/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Implement a piece of work based on a spec or set of tickets.",
"name": "implement",
"requires": [],
"tags": []
},
"path": "skills/engineering/implement"
},
"improve-codebase-architecture": { "improve-codebase-architecture": {
"entry": "skills/engineering/improve-codebase-architecture/SKILL.md", "entry": "skills/engineering/improve-codebase-architecture/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.", "description": "Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.",
"name": "improve-codebase-architecture", "name": "improve-codebase-architecture",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/engineering/improve-codebase-architecture" "path": "skills/engineering/improve-codebase-architecture"
}, },
"loop-me": {
"entry": "skills/in-progress/loop-me/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Grill me about specs for the workflows I want to build, within this workspace.",
"name": "loop-me",
"requires": [],
"tags": []
},
"path": "skills/in-progress/loop-me"
},
"migrate-to-shoehorn": { "migrate-to-shoehorn": {
"entry": "skills/misc/migrate-to-shoehorn/SKILL.md", "entry": "skills/misc/migrate-to-shoehorn/SKILL.md",
"licenseFiles": [ "licenseFiles": [
@@ -875,7 +1023,7 @@
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Build a throwaway prototype to flesh out a design before committing to it. Routes between two branches — a runnable terminal app for state/business-logic questions, or several radically different UI variations toggleable from one route. Use when the user wants to prototype, sanity-check a data model or state machine, mock up a UI, explore design options, or says \"prototype this\", \"let me play with it\", \"try a few designs\".", "description": "Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.",
"name": "prototype", "name": "prototype",
"requires": [], "requires": [],
"tags": [] "tags": []
@@ -908,18 +1056,31 @@
}, },
"path": "skills/deprecated/request-refactor-plan" "path": "skills/deprecated/request-refactor-plan"
}, },
"review": { "research": {
"entry": "skills/in-progress/review/SKILL.md", "entry": "skills/engineering/research/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\".", "description": "Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.",
"name": "review", "name": "research",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/in-progress/review" "path": "skills/engineering/research"
},
"resolving-merge-conflicts": {
"entry": "skills/engineering/resolving-merge-conflicts/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Use when you need to resolve an in-progress git merge/rebase conflict.",
"name": "resolving-merge-conflicts",
"requires": [],
"tags": []
},
"path": "skills/engineering/resolving-merge-conflicts"
}, },
"scaffold-exercises": { "scaffold-exercises": {
"entry": "skills/misc/scaffold-exercises/SKILL.md", "entry": "skills/misc/scaffold-exercises/SKILL.md",
@@ -940,7 +1101,7 @@
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the issue tracker, triage labels, or domain docs.", "description": "Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.",
"name": "setup-matt-pocock-skills", "name": "setup-matt-pocock-skills",
"requires": [], "requires": [],
"tags": [] "tags": []
@@ -960,13 +1121,26 @@
}, },
"path": "skills/misc/setup-pre-commit" "path": "skills/misc/setup-pre-commit"
}, },
"setup-ts-deep-modules": {
"entry": "skills/in-progress/setup-ts-deep-modules/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.",
"name": "setup-ts-deep-modules",
"requires": [],
"tags": []
},
"path": "skills/in-progress/setup-ts-deep-modules"
},
"tdd": { "tdd": {
"entry": "skills/engineering/tdd/SKILL.md", "entry": "skills/engineering/tdd/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions \"red-green-refactor\", wants integration tests, or asks for test-first development.", "description": "Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.",
"name": "tdd", "name": "tdd",
"requires": [], "requires": [],
"tags": [] "tags": []
@@ -986,31 +1160,44 @@
}, },
"path": "skills/productivity/teach" "path": "skills/productivity/teach"
}, },
"to-issues": { "to-questionnaire": {
"entry": "skills/engineering/to-issues/SKILL.md", "entry": "skills/in-progress/to-questionnaire/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.", "description": "Turn a decision you can't fully answer into a questionnaire for someone else to fill in.",
"name": "to-issues", "name": "to-questionnaire",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/engineering/to-issues" "path": "skills/in-progress/to-questionnaire"
}, },
"to-prd": { "to-spec": {
"entry": "skills/engineering/to-prd/SKILL.md", "entry": "skills/engineering/to-spec/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.", "description": "Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.",
"name": "to-prd", "name": "to-spec",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/engineering/to-prd" "path": "skills/engineering/to-spec"
},
"to-tickets": {
"entry": "skills/engineering/to-tickets/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker — edges as text in one file per ticket locally, or native blocking links on a real tracker.",
"name": "to-tickets",
"requires": [],
"tags": []
},
"path": "skills/engineering/to-tickets"
}, },
"triage": { "triage": {
"entry": "skills/engineering/triage/SKILL.md", "entry": "skills/engineering/triage/SKILL.md",
@@ -1018,7 +1205,7 @@
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.", "description": "Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.",
"name": "triage", "name": "triage",
"requires": [], "requires": [],
"tags": [] "tags": []
@@ -1038,18 +1225,31 @@
}, },
"path": "skills/deprecated/ubiquitous-language" "path": "skills/deprecated/ubiquitous-language"
}, },
"write-a-skill": { "wayfinder": {
"entry": "skills/productivity/write-a-skill/SKILL.md", "entry": "skills/engineering/wayfinder/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.", "description": "Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.",
"name": "write-a-skill", "name": "wayfinder",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/productivity/write-a-skill" "path": "skills/engineering/wayfinder"
},
"wizard": {
"entry": "skills/in-progress/wizard/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Generate an interactive bash wizard that walks a human through a manual procedure — third-party setup, a one-off migration, an A→B state transition — opening URLs, capturing values, confirming each step, and writing .env files and GitHub Actions secrets.",
"name": "wizard",
"requires": [],
"tags": []
},
"path": "skills/in-progress/wizard"
}, },
"writing-beats": { "writing-beats": {
"entry": "skills/in-progress/writing-beats/SKILL.md", "entry": "skills/in-progress/writing-beats/SKILL.md",
@@ -1057,7 +1257,7 @@
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.", "description": "Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.",
"name": "writing-beats", "name": "writing-beats",
"requires": [], "requires": [],
"tags": [] "tags": []
@@ -1070,50 +1270,139 @@
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Grilling session that mines the user for fragments — heterogeneous nuggets of writing (claims, vignettes, sharp sentences, half-thoughts) — and appends them to a single document as raw material for a future article. Use when the user wants to develop ideas before imposing structure, or mentions \"fragments\", \"ideate\", or \"raw material\" for writing.", "description": "Writing, explore — mine raw fragments, no structure yet.",
"name": "writing-fragments", "name": "writing-fragments",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/in-progress/writing-fragments" "path": "skills/in-progress/writing-fragments"
}, },
"writing-great-skills": {
"entry": "skills/productivity/writing-great-skills/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.",
"name": "writing-great-skills",
"requires": [],
"tags": []
},
"path": "skills/productivity/writing-great-skills"
},
"writing-shape": { "writing-shape": {
"entry": "skills/in-progress/writing-shape/SKILL.md", "entry": "skills/in-progress/writing-shape/SKILL.md",
"licenseFiles": [ "licenseFiles": [
"LICENSE" "LICENSE"
], ],
"metadata": { "metadata": {
"description": "Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.", "description": "Writing, exploit — shape raw material into an article, paragraph by paragraph.",
"name": "writing-shape", "name": "writing-shape",
"requires": [], "requires": [],
"tags": [] "tags": []
}, },
"path": "skills/in-progress/writing-shape" "path": "skills/in-progress/writing-shape"
},
"zoom-out": {
"entry": "skills/engineering/zoom-out/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": "Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.",
"name": "zoom-out",
"requires": [],
"tags": []
},
"path": "skills/engineering/zoom-out"
} }
}, },
"tools": {} "tools": {}
}, },
"narHash": "sha256:f0f009c64fe1572fbfade479e4829f2fd4499f703e7110c1387a5e05bfe00b9e", "narHash": "sha256:51778614e8086c70f3382b8076425f1a6c9edaa6f926e0771e21d10315d2f118",
"ref": null, "ref": null,
"rev": "694fa30311e02c2639942308513555e61ee84a6f", "rev": "ed37663cc5fbef691ddfecd080dff42f7e7e350d",
"root": ".", "root": ".",
"type": "git", "type": "git",
"url": "https://github.com/mattpocock/skills", "url": "https://github.com/mattpocock/skills",
"warnings": [] "warnings": []
}, },
"okf": {
"discovery": {
"agents": {
"include": [
"**/AGENT.md"
],
"paths": [
"agents"
]
},
"prompts": {
"include": [
"**/PROMPT.md"
],
"paths": [
"prompts"
]
},
"skills": {
"include": [
"**/SKILL.md"
],
"paths": [
"skills"
]
},
"tools": {
"include": [
"**/TOOL.md"
],
"paths": [
"tools"
]
}
},
"items": {
"agents": {},
"prompts": {},
"skills": {
"okf": {
"entry": "skills/okf/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": ">-",
"name": "okf",
"requires": [],
"tags": []
},
"path": "skills/okf"
},
"validate": {
"entry": "skills/validate/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": ">-",
"name": "validate",
"requires": [],
"tags": []
},
"path": "skills/validate"
},
"visualize": {
"entry": "skills/visualize/SKILL.md",
"licenseFiles": [
"LICENSE"
],
"metadata": {
"description": ">-",
"name": "visualize",
"requires": [],
"tags": []
},
"path": "skills/visualize"
}
},
"tools": {}
},
"narHash": "sha256:7491a95f121a0e5d045381113955252bd6d401009fe2b9b27752f3caeeb6682e",
"ref": null,
"rev": "cb5c0a9973c81ea3702f677e0b8852d93b47be80",
"root": ".",
"type": "git",
"url": "https://github.com/scaccogatto/okf-skills",
"warnings": []
},
"superpowers": { "superpowers": {
"discovery": { "discovery": {
"agents": { "agents": {
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 MiB

+125
View File
@@ -0,0 +1,125 @@
# ai-memory auf AZ-LT-NIX anbinden
Schritt-für-Schritt-Anleitung, um die Arbeits-Workstation an den zentralen
ai-memory-Server (`https://memory.m3ta.dev`, läuft auf m3-hermes) anzubinden.
Alles auf AZ-LT-NIX landet im Workspace `az`.
Voraussetzungen, die bereits erledigt sind:
- Server, Traefik-Route und der Nutzer `sascha` existieren.
- Der `aim_`-Key mit Label `az-lt-nix` ist ausgestellt und liegt verschlüsselt
(für den Host-Key von AZ-LT-NIX und den Benutzer-Key `sascha.koenig`) im
Patch unten.
- m3ta-home `master` enthält das Modul `coding.aiMemory` (ab Commit `9633512`).
## 1. Patch auf AZ-LT-NIX holen
Der Patch liegt auf m3-kratos unter
`/home/m3tam3re/p/AZ/0001-feat-AZ-LT-NIX-enable-ai-memory-client.patch`.
Er enthält die vier Änderungen (`secrets.nix`, `hosts/AZ-LT-NIX/secrets.nix`,
`hosts/common/users/sascha.koenig.nix`, `secrets/ai-memory-token.age`) und
wurde mit `--binary` erzeugt, damit die `.age`-Datei byteidentisch ankommt.
```bash
# auf AZ-LT-NIX, in einem leeren Verzeichnis oder dem Repo-Ordner
scp m3-kratos:/home/m3tam3re/p/AZ/0001-feat-AZ-LT-NIX-enable-ai-memory-client.patch .
```
## 2. Patch anwenden
```bash
cd ~/p/NIX/AZ-NIX-CLIENTS # oder wo das Repo liegt
git checkout master && git pull --ff-only
git am ../0001-feat-AZ-LT-NIX-enable-ai-memory-client.patch
```
Erwartet: ein neuer Commit `feat(AZ-LT-NIX): enable ai-memory client`.
Gegencheck, dass das Secret für diesen Host lesbar ist:
```bash
age -d -i ~/.ssh/sascha.koenig secrets/ai-memory-token.age | cut -c1-4
```
Erwartet: `aim_`.
## 3. m3ta-home auf den aktuellen Stand ziehen
```bash
nix flake update m3ta-home
git add flake.lock
git commit -m "chore: bump m3ta-home (ai-memory client)"
```
Der Lock muss mindestens auf m3ta-home `9633512` zeigen. Wenn der Pull über
SSH nach `code.m3ta.dev` scheitert, den Flake-Input vorübergehend auf
`git+https://code.m3ta.dev/m3tam3re/m3ta-home` stellen.
## 4. Bauen und switchen
```bash
nix build .#nixosConfigurations.AZ-LT-NIX.config.system.build.toplevel
sudo nixos-rebuild switch --flake .#AZ-LT-NIX
```
In der Activation-Ausgabe darf **keine** Zeile
`ai-memory: token file /run/agenix/ai-memory-token missing, skipping`
stehen. Steht sie da, hat agenix das Secret nicht entschlüsselt (Host-Key
prüfen: `ssh-keyscan -t ed25519 localhost` gegen `secrets.nix`).
## 5. Prüfen
```bash
# Token und Client-Config
ls -la /run/agenix/ai-memory-token ~/.local/share/ai-memory/auth-token
cat ~/.local/share/ai-memory/config.toml # server_url + bearer_token_file
cat ~/.ai-memory.toml # workspace = "az"
# Claude Code: Hooks zeigen auf den Server, MCP ist die stdio-Bridge
grep -c 'memory.m3ta.dev' ~/.claude/settings.json # > 0
claude mcp get ai-memory # Status: Connected, Type: stdio
# OpenCode: Plugin und MCP-Eintrag
grep -o 'const SERVER = "[^"]*"' ~/.config/opencode/plugins/ai-memory-opencode2.ts
grep -A4 '"ai-memory"' ~/.config/opencode/opencode.json
```
Dann eine kurze Claude-Code-Session und eine OpenCode-Session in einem
Arbeits-Repo starten und wieder beenden. Danach von kratos aus:
```bash
ai-memory list-projects
```
Erwartet: das Repo erscheint im Workspace `az`.
## 6. Pushen
```bash
git push origin master
```
## Was das Modul auf dem Host macht
- Nix schreibt `~/.local/share/ai-memory/config.toml` (Server-URL,
`bearer_token_file = /run/agenix/ai-memory-token`), den MCP-Eintrag in
`opencode.json` und den Marker `~/.ai-memory.toml` mit `workspace = "az"`
plus den Capture-Ausschlüssen.
- Die Activation verlinkt `~/.local/share/ai-memory/auth-token` auf das
Secret (Hooks und OpenCode-Plugin lesen diesen Pfad), ruft
`ai-memory install-hooks` für Claude Code und OpenCode2 auf, registriert
für Claude Code die session-aware stdio-Bridge und installiert die Skills
nach `~/.agents/skills`.
- Der Token steht in keiner generierten Datei. Die MCP-Bridge liest ihn aus
der Client-Config, Hooks und Plugin über den `auth-token`-Symlink.
## Bekannte Grenzen
- `ai-memory doctor`, `recent` und `search` im Terminal brauchen den
Root-Bearer und antworten mit dem Host-Key `403`. Agents über MCP sind
nicht betroffen.
- Ist der Server nicht erreichbar, puffern die Hooks lokal in
`~/.local/share/ai-memory/hook-spool` und liefern nach.
- Key rotieren: auf m3-hermes `ai-memory api-key rotate` für Label
`az-lt-nix`, neuen Wert mit `age -r <AZ-LT-NIX> -r <sascha.koenig>` in
`secrets/ai-memory-token.age` schreiben, switchen.
@@ -0,0 +1,258 @@
# ai-memory Rollout Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Ein zentraler, selbst gehosteter ai-memory-Server (aimemory.sh) auf m3-hermes, an den Claude Code + OpenCode2 auf m3-kratos und AZ-LT-NIX sowie Hermes auf m3-hermes deklarativ angebunden sind.
**Architecture:** Server via Upstream-NixOS-Modul `services.ai-memory` in `nixos-config` (m3-hermes), öffentlich über Traefik auf m3-atlas → Netbird. Clients über ein neues Home-Manager-Modul `coding.aiMemory` in `m3ta-home` (Hybrid: Nix verwaltet Paket, Env, Marker und OpenCode-MCP; eine Activation ruft `ai-memory install-hooks`/`install-mcp`/`install-skills` auf). Host-Repos liefern pro Host ein agenix-Token und schalten das Modul ein.
**Tech Stack:** NixOS, Home-Manager, agenix, Traefik, Netbird, ai-memory 3.2.x (`github:akitaonrails/ai-memory`), hermes-agent NixOS-Modul.
**Spec:** Die Entscheidungen aus der Grilling-Session vom 2026-10-24 stehen unten unter „Entscheidungen“. Upstream-Doku: geklont unter `github.com/akitaonrails/ai-memory` → `README.md#nixos`, `nix/nixos-module.nix`, `docs/install.md` (Auth ab Z. ~3590), `docs/marker-file.md`, `docs/support-matrix.md` (Hermes-Zeile), `docs/llm-providers.md`.
## Entscheidungen (Spec)
- Es gibt **einen** Server auf m3-hermes für privat **und** Arbeit. Getrennt wird nur über Projekte in ai-memory.
- Upstream-Modul `services.ai-memory` als System-Service unter `/var/lib/ai-memory`. Auf Clients läuft **kein** Server.
- Alle Clients nutzen `https://memory.m3ta.dev` (MCP, Hooks, Web-UI). Hermes ist auf demselben Host und nutzt `http://127.0.0.1:<port>`.
- Ein Bearer-Token pro Host (kratos, AZ-LT-NIX, hermes) als `aim_`-API-Key, im Host-Repo mit agenix verschlüsselt. Der Admin-Login für das Web-UI läuft über das Root-Passwort (einmalig per Env).
- LLM-Konsolidierung über `openai-compat` mit dem privaten z.ai/GLM-Key in einem **eigenen** Secret, nicht in `hermes-env`.
- Client = Hybrid in m3ta-home: Skills ja, **keine** `install-instructions`-Snippets in CLAUDE.md/AGENTS.md.
- Capture-Ausschlüsse: `/run/agenix/**`, `~/.config/sops/**`, `~/.ssh/**`, `**/.env*`.
- Hermes: Hooks + MCP + Skills deklarativ. **Honcho bleibt** Memory-Provider. Das Community-Plugin wird nicht genutzt.
- Agents: kratos + AZ-LT-NIX = Claude Code + OpenCode2. m3-hermes = nur Hermes.
- Imperatives Test-Setup auf kratos (User-Unit, `~/.local/share/ai-memory`, MCP-Eintrag auf Port 49374) wird **ohne Backup** entfernt.
- Rollout: (1) Server + Traefik → (2) kratos → (3) Hermes → (4) AZ-LT-NIX. Nach jeder Stufe `ai-memory doctor`.
- **Nicht in diesem Plan:** Transkript-Backfill (später manuell), `ai-memory-wikisync`-Backup (Phase 2).
## Global Constraints
- Server-Port: `49374` (Upstream-Default), registriert als `ai-memory` in `hosts/common/ports.nix` (nixos-config).
- Öffentliche URL: `https://memory.m3ta.dev`. Die MCP-URL ist `https://memory.m3ta.dev/mcp`.
- Netbird-Range für die Firewall: `100.64.0.0/16`. m3-hermes hat die Netbird-IP `100.81.231.152` (wie beim hermes-dashboard-Service in `hosts/m3-atlas/services/traefik.nix`).
- Server-Secrets landen nur in `services.ai-memory.ageSecret`, **nie** in `settings` (das liegt sonst world-readable im Nix-Store).
- Client-Token-Pfad (Default): `/run/agenix/ai-memory-token`. Er muss für den jeweiligen User lesbar sein (`owner = "m3tam3re"` bzw. `"sascha.koenig"`).
- Im Client-Modul gibt es keine fest verdrahteten `/home/m3tam3re`-Pfade, nur `config.home.homeDirectory`.
- Server und Clients müssen dieselbe Major/Minor-Version von ai-memory haben. Clients nutzen `pkgs.llm-agents.ai-memory`, der Server das Flake-Input. Bei Abweichung wird der Server per `services.ai-memory.package` auf das llm-agents-Paket umgestellt.
- `git` muss neben dem Client-Binary im PATH liegen (die Hooks rufen es auf).
## Review Focus
1. **Token-Datei fehlt oder ist nicht lesbar** (z.B. Host ohne Secret, erster Switch vor agenix): Die Activation darf nicht fehlschlagen. Sie überspringt mit einer klaren Warnung und schreibt keine Hooks mit leerem Token. Den Test dafür gibt es in Task 4, Step 1.
2. **Home-Manager überschreibt Dateien, die die Activation geschrieben hat:** `~/.config/opencode/opencode.json` ist ein HM-Symlink. `install-mcp --client opencode2` darf dort **nicht** schreiben, der MCP-Eintrag läuft über `programs.mcp`. Den Test dafür gibt es in Task 4, Step 6.
3. **Server nicht erreichbar** (AZ-LT-NIX offline, m3-hermes down): Die Hooks puffern lokal, und die Agents starten trotzdem. Das prüft Task 5, Step 6.
4. **Port/URL-Drift**, wie im Test, bei dem MCP auf 49374 und die Hooks auf 49375 zeigten: Hooks, MCP und `AI_MEMORY_SERVER_URL` müssen aus derselben Option `serverUrl` kommen. Das prüft `ai-memory doctor` in Task 5, Step 5.
5. **Secrets im Capture:** Ein Agent liest `/run/agenix/*` oder `.env`, und die Inhalte landen im Wiki. Den Test über den Home-Marker gibt es in Task 5, Step 7.
---
## Phase 1: Server (Repo `nixos-config`)
### Task 1: Secrets und Flake-Input für den Server
**Files:**
- Modify: `nixos-config/flake.nix` (Input `ai-memory`, Modul in die m3-hermes-Module)
- Modify: `nixos-config/secrets.nix` (neue `.age`-Einträge)
- Create: `nixos-config/secrets/ai-memory-server-env.age`
- Modify: `nixos-config/hosts/m3-hermes/secrets.nix`
- Modify: `nixos-config/hosts/common/ports.nix` (`ai-memory = 49374;`)
**Interfaces:**
- Produces: `config.age.secrets."ai-memory-server-env"` auf m3-hermes. `inputs.ai-memory` steht in `specialArgs` zur Verfügung. `config.m3ta.ports.get "ai-memory"` liefert `49374`.
- [ ] **Step 1: Flake-Input ergänzen**: `ai-memory.url = "github:akitaonrails/ai-memory";` mit `inputs.nixpkgs.follows = "nixpkgs"`. `ai-memory.nixosModules.default` kommt **nur** in die Modulliste von m3-hermes.
- [ ] **Step 2: Secret-Datei anlegen** (`agenix -e secrets/ai-memory-server-env.age`, publicKeys = `[m3-hermes] ++ users`) mit:
```env
AI_MEMORY_AUTH_TOKEN=<openssl rand -hex 32> # Root-Bearer (Admin-CLI, nie an Clients)
AI_MEMORY_AUTH__TOKEN_PEPPER=<openssl rand -hex 32> # nötig für aim_-API-Keys
AI_MEMORY_AUTH__RECOVERY_TOKEN=<openssl rand -hex 32>
AI_MEMORY_AUTH__INITIAL_ROOT_PASSWORD=<≥12 Zeichen, nur beim ersten Start genutzt>
AI_MEMORY_AUTH__SECURE_COOKIE=true
AI_MEMORY_AUTH__TRUSTED_PROXY_CIDRS=100.64.0.0/16
AI_MEMORY_LLM_PROVIDER=openai-compat
AI_MEMORY_LLM_BASE_URL=https://api.z.ai/api/coding/paas/v4
AI_MEMORY_LLM_MODEL=glm-5.3-flash
LLM_API_KEY=<privater z.ai-Key>
```
Ob die Env-Namen `AI_MEMORY_AUTH__TOKEN_PEPPER` bzw. `__BEARER_TOKEN` stimmen, wird gegen `nix/nixos-module.nix` (`secretKeysInSettings`) und `docs/install.md` geprüft, bevor das Secret verschlüsselt wird.
- [ ] **Step 3: Eval prüfen**
Run: `nix eval .#nixosConfigurations.m3-hermes.config.age.secrets.ai-memory-server-env.path`
Expected: `"/run/agenix/ai-memory-server-env"`
- [ ] **Step 4: Commit** `feat(m3-hermes): add ai-memory input, ports and server secret`
### Task 2: ai-memory-Server auf m3-hermes
**Files:**
- Create: `nixos-config/hosts/m3-hermes/services/ai-memory.nix`
- Modify: `nixos-config/hosts/m3-hermes/services/default.nix` (Import)
**Interfaces:**
- Consumes: Task 1 (Secret, Port, Modul)
- Produces: Server lauscht auf `0.0.0.0:49374`. Die Firewall lässt den Port nur aus `100.64.0.0/16` durch, Loopback ist für Hermes offen.
- [ ] **Step 1: Modul schreiben** im Stil von `hermes-dashboard.nix` (`let`-Block für `netbirdRange`/`port`):
- `services.ai-memory = { enable = true; bind = "0.0.0.0"; port = config.m3ta.ports.get "ai-memory"; enableWeb = true; ageSecret = "ai-memory-server-env"; openFirewall = false; settings.allowed_hosts = ["memory.m3ta.dev" "localhost" "127.0.0.1" "::1"]; }`
- `networking.firewall.extraCommands`: `ip46tables -A nixos-fw -p tcp --dport <port> -s 100.64.0.0/16 -j nixos-fw-accept`
- [ ] **Step 2: Bauen**
Run: `nix build .#nixosConfigurations.m3-hermes.config.system.build.toplevel`
Expected: Build ok, ohne Assertion zu Secret-Quellen bei Non-Loopback-Bind.
- [ ] **Step 3: Deployen und Health prüfen** (auf m3-hermes)
Run: `systemctl is-active ai-memory && curl -s http://127.0.0.1:49374/healthz`
Expected: `active` und `{"status":"ok"}`
- [ ] **Step 4: Root-Passwort ändern und Bootstrap-Secret entfernen**: Einmal einloggen (das erzwingt den Passwortwechsel). Danach `AI_MEMORY_AUTH__INITIAL_ROOT_PASSWORD` aus dem Secret löschen, neu verschlüsseln und deployen.
- [ ] **Step 5: Commit** `feat(m3-hermes): run ai-memory server`
### Task 3: Traefik-Route `memory.m3ta.dev` und Host-Tokens
**Files:**
- Create: `nixos-config/hosts/m3-atlas/services/ai-memory.nix` (Muster: `vaultwarden.nix`, also `services.traefik.dynamicConfigOptions.http.{services,routers}.ai-memory`)
- Modify: `nixos-config/hosts/m3-atlas/services/default.nix`
**Interfaces:**
- Consumes: Task 2 (Server auf `100.81.231.152:49374`)
- Produces: `https://memory.m3ta.dev` sowie drei `aim_`-Keys (`kratos`, `az-lt-nix`, `hermes`), die vorerst nur im Passwortmanager liegen und in Task 5/6/7 in agenix kommen.
- [ ] **Step 1: Route anlegen**: `services.ai-memory.loadBalancer.servers = [{url = "http://100.81.231.152:49374";}]` und `routers.ai-memory = { rule = "Host(\`memory.m3ta.dev\`)"; tls.certResolver = "godaddy"; service = "ai-memory"; entrypoints = "websecure"; }`. Der DNS-Eintrag `memory.m3ta.dev` → m3-atlas wird gesetzt.
- [ ] **Step 2: Von außen prüfen** (von einem Gerät außerhalb von Netbird)
Run: `curl -s https://memory.m3ta.dev/healthz; curl -s -o /dev/null -w '%{http_code}\n' https://memory.m3ta.dev/mcp`
Expected: `{"status":"ok"}` und `401` (ohne Token kein Zugriff)
- [ ] **Step 3: Host-Keys erzeugen** (auf m3-hermes, als Service-User mit Root-Bearer):
Run: `for h in kratos az-lt-nix hermes; do sudo -u ai-memory ai-memory --data-dir /var/lib/ai-memory api-key add --username root --label $h; done`
Expected: drei `aim_…`-Tokens, einmalig angezeigt und sofort sicher abgelegt.
- [ ] **Step 4: Web-UI prüfen**: `https://memory.m3ta.dev/web` → Login als Root funktioniert, und das Cookie trägt das `Secure`-Flag.
- [ ] **Step 5: Commit** `feat(m3-atlas): route memory.m3ta.dev to ai-memory`
---
## Phase 2: Client-Modul (Repo `m3ta-home`)
### Task 4: Home-Manager-Modul `coding.aiMemory`
**Files:**
- Create: `m3ta-home/profiles/sets/coding/agents/ai-memory.nix`
- Modify: `m3ta-home/profiles/sets/coding/agents/agents.nix` (Import ergänzen, `llm-agents.ai-memory` aus `home.packages` entfernen; das Paket kommt jetzt aus dem Modul)
- Test: `m3ta-home/profiles/sets/coding/agents/ai-memory.test.sh` (Eval-Checks gegen eine Test-HM-Konfiguration bzw. eine bestehende `homeConfigurations`-Ausgabe)
**Interfaces:**
- Produces (Optionen, die die Host-Repos setzen):
- `coding.aiMemory.enable : bool` (default `false`)
- `coding.aiMemory.serverUrl : str` (default `"https://memory.m3ta.dev"`)
- `coding.aiMemory.tokenFile : str` (default `"/run/agenix/ai-memory-token"`)
- `coding.aiMemory.agents : listOf (enum ["claude-code" "opencode2"])` (default `["claude-code" "opencode2"]`)
- `coding.aiMemory.ignorePaths : listOf str` (default `["/run/agenix/**" "~/.config/sops/**" "~/.ssh/**" "**/.env*"]`)
- [ ] **Step 1: Failing Eval-Test schreiben** (`ai-memory.test.sh`, nutzt `nix eval` gegen eine Konfiguration mit `coding.aiMemory.enable = true`). Er prüft:
- `home.sessionVariables.AI_MEMORY_SERVER_URL == "https://memory.m3ta.dev"`
- `programs.mcp.servers.ai-memory.command == "bash"`, und `args` enthält `mcp-bridge --no-session-id --server-url https://memory.m3ta.dev/mcp` sowie `$(cat /run/agenix/ai-memory-token)`
- `home.file.".ai-memory.toml".text` enthält `[capture]` und alle vier `ignorePaths`
- `home.activation ? aiMemoryInstall`
- Activation-Skript: Bei fehlender Token-Datei steht `ai-memory: token file … missing, skipping` auf stderr und der Exit-Code ist 0. Getestet wird mit dem extrahierten Skript, `tokenFile` zeigt auf einen nicht existierenden Pfad, und `ai-memory` ist per PATH-Stub ersetzt.
- [ ] **Step 2: Test laufen lassen**
Run: `bash profiles/sets/coding/agents/ai-memory.test.sh`
Expected: FAIL (Option `coding.aiMemory` existiert nicht)
- [ ] **Step 3: Modul implementieren** (Stil wie `packages.nix`: `cfg = config.coding.aiMemory`, `mkEnableOption`, `mkIf`):
- `home.packages = [pkgs.llm-agents.ai-memory pkgs.git]`
- `home.sessionVariables.AI_MEMORY_SERVER_URL = cfg.serverUrl`
- `programs.mcp.servers.ai-memory` nach dem Muster des `exa`-Eintrags: `bash -c "AI_MEMORY_AUTH_TOKEN=$(cat <tokenFile>) exec ai-memory mcp-bridge --no-session-id --server-url <serverUrl>/mcp"`. OpenCode2 übernimmt das über `enableMcpIntegration`.
- `home.file.".ai-memory.toml".text` mit `[capture]` und `ignore_paths = [...]` (der Home-Marker gilt für alles unterhalb von `$HOME` ohne eigenen Marker)
- `home.activation.aiMemoryInstall = lib.hm.dag.entryAfter ["writeBoundary" "claudeSkillsSync"]`. Das Skript macht Folgendes:
1. Ist `tokenFile` nicht lesbar: Warnung auf stderr und `return 0`.
2. `tok=$(cat tokenFile)`
3. Für jeden Agent in `cfg.agents`: `$DRY_RUN_CMD ai-memory install-hooks --agent <agent> --apply --server-url <serverUrl> --auth-token "$tok"`
4. Falls `claude-code` in `agents` steht: `claude mcp remove ai-memory -s user || true` und danach `ai-memory install-mcp --client claude-code --apply --server-url <serverUrl>/mcp --auth-token "$tok"` (session-aware Bridge)
5. `ai-memory install-skills --scope global --apply`. Die Skills landen in `~/.agents/skills`, und `claude-skills-sync` spiegelt sie.
- **Kein** `install-mcp --client opencode2` (sonst Konflikt mit dem HM-Symlink `opencode.json`), **kein** `install-instructions`.
- [ ] **Step 4: Test laufen lassen**
Run: `bash profiles/sets/coding/agents/ai-memory.test.sh`
Expected: PASS
- [ ] **Step 5: Ob die Flags stimmen, gegen die installierte Version prüfen**
Run: `ai-memory install-skills --help; ai-memory install-mcp --help | grep -A3 auth-token`
Expected: `--scope global`, `--apply` und `--auth-token` gibt es. Sonst wird Step 3 an die echten Flags angepasst.
- [ ] **Step 6: HM-Konflikt-Check** (Review Focus #2)
Run: `nix eval` auf `xdg.configFile."opencode/opencode.json".text` der Test-Konfiguration und dort nach `ai-memory` greppen
Expected: Eintrag vorhanden (kommt aus `programs.mcp`), und die Activation enthält **kein** `install-mcp --client opencode`.
- [ ] **Step 7: Commit** `feat(coding): add ai-memory client module`
---
## Phase 3: Rollout
### Task 5: m3-kratos anbinden (Repo `nixos-config`)
**Files:**
- Create: `nixos-config/secrets/ai-memory-token-kratos.age` (Inhalt: der `aim_`-Key `kratos` aus Task 3)
- Modify: `nixos-config/secrets.nix`, `nixos-config/hosts/m3-kratos/secrets.nix` (`ai-memory-token = { file = ../../secrets/ai-memory-token-kratos.age; owner = "m3tam3re"; };`)
- Modify: `nixos-config/hosts/common/users/m3tam3re.nix` (in den kratos-`hostFlags` den Eintrag `coding.aiMemory.enable = true;` setzen)
- Modify: `nixos-config/flake.lock` (`nix flake update m3ta-home`)
**Interfaces:**
- Consumes: Task 3 (Key `kratos`), Task 4 (`coding.aiMemory`)
- [ ] **Step 1: Imperatives Test-Setup abräumen** (auf kratos, einmalig):
```bash
systemctl --user disable --now ai-memory.service
rm ~/.config/systemd/user/ai-memory.service && systemctl --user daemon-reload
claude mcp remove ai-memory -s user
rm -rf ~/.local/share/ai-memory ~/.config/opencode/plugins/ai-memory-opencode2.ts
```
Die Hook-Einträge in `~/.claude/settings.json` überschreibt `install-hooks --apply` in Step 3. Danach prüfen, dass keine Einträge mit `127.0.0.1:49375` übrig sind.
- [ ] **Step 2: Secret + Flag + Lock**, dann `nix build .#nixosConfigurations.m3-kratos.config.system.build.toplevel`. Expected: Build ok.
- [ ] **Step 3: Switch**
Run: `sudo nixos-rebuild switch --flake .#m3-kratos`
Expected: In der Activation-Ausgabe steht keine `skipping`-Warnung.
- [ ] **Step 4: Kein Drift**
Run: `grep -c 'memory.m3ta.dev' ~/.claude/settings.json; grep -c '4937[45]' ~/.claude/settings.json ~/.claude.json`
Expected: >0 bzw. `0`
- [ ] **Step 5: Doctor**
Run: `cd ~/p/NIX/m3ta-home && ai-memory doctor`
Expected: Server erreichbar, Auth ok. Nach einer kurzen Claude-Code- und einer OpenCode2-Session: beide Harnesses haben Sessions erfasst.
- [ ] **Step 6: Offline-Verhalten** (Review Focus #3): `sudo systemctl stop ai-memory` auf m3-hermes. Danach in Claude Code einen Prompt absetzen. Expected: Die Session startet ohne Fehler, und `~/.local/share/ai-memory/hook-spool` wächst. Nach dem Neustart des Servers sind die Events nachgeliefert (`ai-memory doctor`).
- [ ] **Step 7: Ausschluss-Check** (Review Focus #5): In Claude Code `cat /run/agenix/exa-key` ausführen lassen. Expected: `ai-memory hook --check-capture` bzw. die Session-Seite im Web-UI enthält weder den Befehl noch den Inhalt.
- [ ] **Step 8: Commit** `feat(m3-kratos): enable ai-memory client`
### Task 6: Hermes anbinden (Repo `nixos-config`)
**Files:**
- Create: `nixos-config/secrets/ai-memory-hermes-env.age` (Inhalt: `AI_MEMORY_AUTH_TOKEN=<aim_ hermes>`)
- Modify: `nixos-config/hosts/m3-hermes/secrets.nix`, `nixos-config/secrets.nix`
- Modify: `nixos-config/hosts/m3-hermes/services/hermes-agent.nix`
**Interfaces:**
- Consumes: Task 2 (Server auf Loopback), Task 3 (Key `hermes`)
- [ ] **Step 1: Snippets erzeugen** (auf m3-hermes):
Run: `ai-memory install-hooks --agent hermes --server-url http://127.0.0.1:49374; ai-memory install-mcp --client hermes --server-url http://127.0.0.1:49374/mcp`
Expected: YAML-Blöcke `hooks:` (sechs Events) und `mcp_servers:`. Diese werden 1:1 als Nix-Attrsets übernommen.
- [ ] **Step 2: Einbauen** in `services.hermes-agent`:
- `environmentFiles` um `config.age.secrets."ai-memory-hermes-env".path` ergänzen
- `extraPackages` um `inputs.ai-memory.packages.${pkgs.stdenv.hostPlatform.system}.default` ergänzen (gleiche Version wie der Server)
- `settings.hooks = <aus Step 1>`, `settings.hooks_auto_accept = true`
- `settings.mcp_servers.ai-memory = <aus Step 1>` (Bridge mit `--no-session-id`, ohne Token in der Datei)
- `settings.memory.provider` bleibt `"honcho"`
- [ ] **Step 3: Skills installieren**: ein `systemd.services.hermes-ai-memory-skills` (oneshot, `User = "hermes"`, `HOME=/var/lib/hermes`, `HERMES_HOME=/var/lib/hermes/.hermes`, `before = ["hermes-agent.service"]`), das `ai-memory install-skills --scope global --agent hermes --apply` ausführt.
- [ ] **Step 4: Bauen + Switch**, dann:
Run: `grep -A2 'ai-memory' /var/lib/hermes/.hermes/config.yaml | head; ls /var/lib/hermes/.hermes/skills | grep ai-memory`
Expected: Hooks und MCP-Eintrag stehen in der Datei, die Skills sind vorhanden.
- [ ] **Step 5: End-to-End-Test** (laut Doku von Upstream noch nicht verifiziert): Hermes über das Gateway eine kleine Aufgabe machen lassen, z.B. ein Repo listen, und danach `/new`. Expected: Im Web-UI erscheint eine Hermes-Session mit Prompt und Tool-Calls. Bei der nächsten Session bekommt Hermes über `pre_llm_call` den Handoff. Läuft das nicht, Abweichungen dokumentieren und im Upstream-Issue-Tracker melden.
- [ ] **Step 6: Commit** `feat(m3-hermes): wire hermes-agent into ai-memory`
### Task 7: AZ-LT-NIX anbinden (Repo `AZ-NIX-CLIENTS`)
**Files:**
- Create: `secrets/ai-memory-token.age` (publicKeys `[AZ-LT-NIX sascha.koenig]`, Inhalt: der `aim_`-Key `az-lt-nix`)
- Modify: `secrets.nix`, `hosts/AZ-LT-NIX/secrets.nix` (`ai-memory-token = { file = ../../secrets/ai-memory-token.age; owner = "sascha.koenig"; };`)
- Modify: `hosts/common/users/sascha.koenig.nix` (in den AZ-LT-NIX-`hostFlags` unter `coding` den Eintrag `aiMemory.enable = true;` setzen)
- Modify: `flake.lock` (`nix flake update m3ta-home`)
**Interfaces:**
- Consumes: Task 3 (Key `az-lt-nix`), Task 4 (`coding.aiMemory`)
- [ ] **Step 1: Secret + Flag + Lock**, dann `nix build .#nixosConfigurations.AZ-LT-NIX.config.system.build.toplevel`. Expected: Build ok.
- [ ] **Step 2: Switch** auf AZ-LT-NIX, **ohne** dass das private Netbird verbunden ist.
- [ ] **Step 3: Doctor** in einem Arbeits-Repo
Run: `ai-memory doctor`
Expected: `https://memory.m3ta.dev` ist erreichbar, und Claude-Code- sowie OpenCode2-Sessions werden erfasst. Der Projektname im Web-UI ist ein anderer als bei den privaten Repos.
- [ ] **Step 4: Pfade prüfen**
Run: `grep -c '/home/m3tam3re' ~/.claude/settings.json ~/.config/opencode/plugins/ai-memory-opencode2.ts`
Expected: `0`
- [ ] **Step 5: Commit + Push** `feat(AZ-LT-NIX): enable ai-memory client`
@@ -0,0 +1,139 @@
# T3 Code als NixOS-Modul: Implementierungsplan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** T3 Code läuft aus einem Modul in m3ta-home auf m3-kratos und AZ-LT-NIX, folgt dem aktiven NetBird-Profil, und T3-Agents arbeiten auf beiden Gitea-Instanzen als `m3ta-chiron`.
**Architecture:** m3ta-home exportiert `nixosModules.t3code` und `overlays.t3code-agent-identity`. `nixos-config` und AZ-NIX-CLIENTS binden beides ein und liefern pro Host nur `enable`, `user`, `port` und Secrets.
**Tech Stack:** Nix Flakes, NixOS-Module, systemd, agenix, tea, NetBird 0.81.
**Spec:** `docs/superpowers/specs/2026-11-02-t3code-nixos-module-design.md`
## Global Constraints
- Secret-Pfade: `/run/agenix/agent-gitea-token-m3ta` und `/run/agenix/agent-gitea-token-az`.
- Instanzen: `m3ta` = `https://code.m3ta.dev`, SSH-Port 22; `az` = `https://git.az-gruppe.com`, SSH-Port 2022; SSH-User jeweils `gitea`.
- Identität: `m3ta-chiron` / `m3ta-chiron@agentmail.to`; Schlüssel `~/.ssh/m3ta-chiron`.
- Host-Keys: `code.m3ta.dev ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmmqZ4GgDEXJgj8uYrZAr/EoLIA6LJGkTIyKGQD/60a` und `[git.az-gruppe.com]:2022 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIItSijmU5YwcJcoshtmYxpxBaVA4TPaCMk23ws7KDkAH`.
- Port-Default `3773`; Interface-Default `wt0`.
- Kein `switch`, kein Push und kein Merge ohne ausdrückliche Freigabe. Arbeit in jedem Repo auf dem Branch `feat/t3code-module`.
- `nixos-config` nur in einem Worktree auf Basis von `origin/master` ändern; `secrets/rustfs-secret-key.age` im Hauptcheckout bleibt unberührt.
- Tokens nie in Logs, Testausgaben oder den Nix-Store.
## Review Focus
- `wt0` ist beim Dienststart da, hat aber noch keine IPv4: Das Skript wartet höchstens 60 Sekunden und bindet nie an `0.0.0.0` (Test Task 1).
- Nur ein Token ist lesbar: Genau dieser Login wird erzeugt und trägt `default: true` (Test Task 2).
- Kein Token ist lesbar: `tea` läuft ohne Login weiter, ohne Abbruch im Wrapper (Test Task 2).
- `user` fehlt oder NetBird ist aus: Die Evaluation scheitert mit klarer Meldung statt zur Laufzeit (Test Task 1).
- Git-Remote auf `git.az-gruppe.com`: SSH nutzt Port 2022 und `m3ta-chiron`, andere Hosts weiter `~/.ssh/config` (Test Task 2).
---
### Task 0: Voraussetzungen durch Sascha
Nicht durch Agents ausführbar. Task 1 hängt nur an Schritt 1, Task 4 und 5 auch an den Secrets.
- [ ] **Step 1: `wt0`-Verhalten prüfen.** Zweites Profil anlegen, wechseln und `ip monitor link dev wt0` beobachten. Erwartet: `wt0` verschwindet und entsteht neu. Sonst bekommt Task 1 den in der Spec genannten `ip monitor`-Watcher.
- [ ] **Step 2: Schlüssel und Tokens.** Tabelle „Voraussetzungen“ der Spec abarbeiten.
- [ ] **Step 3: `.age`-Dateien** laut Tabelle „Secrets“ der Spec erzeugen, nachdem Task 4 und 5 die `secrets.nix`-Einträge ergänzt haben.
### Task 1: NixOS-Modul
**Files:**
- Create: `modules/nixos/t3code.nix`
- Create: `modules/nixos/t3code.test.sh`
- Modify: `flake.nix`
**Interfaces:**
- Produces: `nixosModules.t3code` mit den Optionen `m3ta.t3code.{enable,user,port,interface,package}` aus der Spec.
- [ ] **Step 1: Test schreiben.** `t3code.test.sh` evaluiert das Modul per `nixpkgs.lib.nixosSystem` mit einem Stub-`llm-agents.t3code` (Stil wie `profiles/sets/coding/agents/ai-memory.test.sh`) und prüft:
- `bindsTo` und `wantedBy` enthalten `sys-subsystem-net-devices-wt0.device`
- `serviceConfig.User` ist `alice`, `environment.T3CODE_PORT` ist `"3773"`, `HOME` ist `/home/alice`
- `networking.firewall.interfaces.wt0.allowedTCPPorts` ist `[3773]`
- ohne `services.netbird.enable` scheitert der Build von `system.build.toplevel` mit `m3ta.t3code requires services.netbird.enable`
- ohne `user` scheitert die Evaluation
- `enable = false` erzeugt keinen Dienst
- [ ] **Step 2: Startskript-Test ergänzen.** Das Skript mit einem Stub für `ip` und `t3` starten. Liefert der Stub sofort eine Adresse, ist der `t3`-Aufruf `serve --host 100.1.2.3`. Liefert er keine, endet das Skript mit Exit 1 (Timeout im Test per `T3CODE_ADDR_TIMEOUT=1`, Default `60`) und ruft `t3` nicht auf.
- [ ] **Step 3: Test ausführen.** `bash modules/nixos/t3code.test.sh`; erwartet: FAIL, weil das Modul fehlt.
- [ ] **Step 4: Modul schreiben** laut Abschnitt „Modul“ der Spec. Startskript per `pkgs.writeShellApplication`, Adresse per `ip -4 -o addr show dev <interface>`, Aufruf mit `exec`. In `flake.nix`: `nixosModules.t3code = ./modules/nixos/t3code.nix`.
- [ ] **Step 5: Test ausführen.** Erwartet: PASS.
- [ ] **Step 6: Commit** `feat(t3code): add NixOS module bound to the NetBird interface`.
### Task 2: Identitäts-Overlay mit zwei Instanzen
**Files:**
- Create: `overlays/t3code-agent-identity.nix`
- Create: `overlays/t3code-agent-identity.test.sh`
- Modify: `flake.nix`
**Interfaces:**
- Produces: `overlays.t3code-agent-identity`. Die Datei ist `{tokenFiles ? {}}: final: prev: {…}`; die Instanzliste steht in der Datei, `tokenFiles` überschreibt Token-Pfade pro Instanzname (für Tests). Der Flake exportiert die Standardanwendung und behält `inputs.m3ta-nixpkgs.overlays` per `//`.
- [ ] **Step 1: Test schreiben.** Overlay mit Test-Instanzen und temporären Token-Dateien anwenden, gegen einen Stub-`llm-agents.t3code` bauen und prüfen:
- beide Tokens lesbar: `tea logins` listet `m3ta` und `az` mit ihren URLs
- nur `az` lesbar: nur `az`, mit `default: true`
- keiner lesbar: `tea logins` endet mit Exit 0 und leerer Liste
- ein gefälschtes Token taucht nach dem Lauf nirgends unter `$TMPDIR` auf (Temp-Verzeichnis aufgeräumt) und nicht im Closure (`nix-store -qR` + `grep`)
- `ssh -F <config> -G git.az-gruppe.com`: `port 2022`, `user gitea`, `identityfile ~/.ssh/m3ta-chiron`
- `ssh -F <config> -G code.m3ta.dev`: `port 22`, `user gitea`, gleicher Schlüssel
- `ssh -F <config> -G example.org` mit Test-`HOME` und eigener `~/.ssh/config`: nutzt deren Werte, kein `m3ta-chiron`
- im Wrapper sind `GIT_AUTHOR_NAME` und `GIT_COMMITTER_NAME` `m3ta-chiron`
- [ ] **Step 2: Test ausführen.** Erwartet: FAIL.
- [ ] **Step 3: Overlay schreiben.** Aus `git show origin/master:overlays/default.nix` in `nixos-config` übernehmen (`t3code-agent-identity`) und nur die festen Werte durch `instances` ersetzen. Der Rest-Block wird `Host * !code.m3ta.dev !git.az-gruppe.com`, aus `instances` erzeugt. Beibehalten: privates Temp-Verzeichnis pro Aufruf und der Kommentar zum `IdentityFile`-Verhalten.
- [ ] **Step 4: Test ausführen.** Erwartet: PASS.
- [ ] **Step 5: Commit** `feat(t3code): move agent identity overlay here, support two Gitea instances`.
### Task 3: `gitIdentity.sshKey` überschreibbar
**Files:**
- Modify: `profiles/sets/coding/agents/agents.nix:16`
- [ ] **Step 1: Ändern.** `sshKey = lib.mkDefault "/home/m3tam3re/.ssh/gitea"`, `lib` in die Modulargumente aufnehmen.
- [ ] **Step 2: Prüfen.** Aus AZ-NIX-CLIENTS: `nix eval --raw --override-input m3ta-home path:<m3ta-home> .#nixosConfigurations.AZ-LT-NIX.config.home-manager.users."sascha.koenig".coding.agents.gitIdentity.sshKey`. Erwartet: `/home/m3tam3re/.ssh/gitea`, also unverändert ohne Override.
- [ ] **Step 3: Commit** `fix(agents): let hosts override the agent SSH key path`.
### Task 4: AZ-NIX-CLIENTS einbinden
**Files** (Repo `AZ-NIX-CLIENTS`):
- Modify: `hosts/common/default.nix` (Overlay nach `llm-agents-overrides`, Modul-Import)
- Modify: `hosts/common/ports.nix` (`t3code = 3773`)
- Modify: `hosts/common/users/sascha.koenig.nix` (`coding.agents.gitIdentity.sshKey = "/home/sascha.koenig/.ssh/m3ta-chiron"` in den AZ-LT-NIX-Flags)
- Modify: `hosts/AZ-LT-NIX/services/default.nix` oder neue `services/t3code.nix` (`m3ta.t3code`)
- Modify: `hosts/AZ-LT-NIX/secrets.nix`, `secrets.nix`
**Interfaces:**
- Consumes: `nixosModules.t3code`, `overlays.t3code-agent-identity`.
- [ ] **Step 1: Änderungen ohne Secrets einbauen.** `m3ta.t3code = { enable = true; user = "sascha.koenig"; port = config.m3ta.ports.get "t3code"; };`
- [ ] **Step 2: Bauen.** `nixos-rebuild build --flake .#AZ-LT-NIX --override-input m3ta-home path:<m3ta-home>`; erwartet: Erfolg.
- [ ] **Step 3: Werte prüfen.** Per `nix eval`: `systemd.services.t3code.serviceConfig.User` ist `sascha.koenig`, `gitIdentity.sshKey` ist der neue Pfad.
- [ ] **Step 4: Thin Client prüfen.** `nix eval .#nixosConfigurations.AZ-TC-01.config.systemd.services.t3code.enable` mit Override: Fehler oder fehlender Dienst; der Host bekommt keinen T3-Dienst.
- [ ] **Step 5: Commit** `feat(AZ-LT-NIX): run T3 Code from the m3ta-home module`.
- [ ] **Step 6: Secret-Einträge ergänzen,** sobald Saschas `.age`-Dateien da sind (Rezept: `publicKeys` aus der Spec), bauen, Commit `feat(AZ-LT-NIX): add agent Gitea tokens`.
### Task 5: nixos-config umstellen
**Files** (Repo `nixos-config`, Worktree auf `origin/master`):
- Modify: `hosts/common/default.nix`, `overlays/default.nix` (lokales Overlay entfernen, das aus m3ta-home einbinden, Modul-Import)
- Delete: `hosts/m3-kratos/services/t3code.nix`
- Modify: `hosts/m3-kratos/services/default.nix`, `hosts/m3-kratos/secrets.nix`, `hosts/m3-hermes/secrets.nix`, `hosts/m3-hermes/services/t3code.nix` (Kommentar zum Secret-Namen), `secrets.nix`
**Interfaces:**
- Consumes: wie Task 4.
- [ ] **Step 1: Worktree anlegen** und Modul sowie Overlay einbinden. Für m3-kratos: `m3ta.t3code` laut Spec.
- [ ] **Step 2: Bauen.** m3-kratos und m3-hermes mit `--override-input m3ta-home path:<m3ta-home>`; erwartet: Erfolg.
- [ ] **Step 3: Prüfen.** m3-hermes-`ExecStart` enthält weiter `--host 0.0.0.0`. m3-kratos-`ExecStart` enthält keine feste IP mehr.
- [ ] **Step 4: Commit** `refactor(m3-kratos): use the T3 Code module from m3ta-home`.
- [ ] **Step 5: Secrets umstellen,** sobald Saschas `.age`-Dateien da sind: `hermes-gitea-token` durch `agent-gitea-token-m3ta` ersetzen, `agent-gitea-token-az` nur auf m3-kratos. `git grep hermes-gitea-token` ist danach leer. Bauen, Commit `refactor(secrets): rename agent Gitea tokens per instance`.
### Task 6: Abschluss und Rollout
Pushes, Lock-Updates und `switch` nur nach ausdrücklicher Freigabe.
- [ ] **Step 1:** m3ta-home mergen und pushen, in beiden Repos `nix flake update m3ta-home`, ohne Override erneut bauen.
- [ ] **Step 2:** Deployment auf AZ-LT-NIX, dann m3-kratos; m3-hermes erhält nur den Secret-Wechsel.
- [ ] **Step 3: Kriterien 2 bis 6 der Spec prüfen.** Je Profil `ss -ltnp | grep 3773` zeigt die aktuelle NetBird-IP. Je Instanz ein Testcommit aus einer T3-Session (`git log -1 --format='%an %cn'`), Push und `tea repos`. Pairing pro Netz prüfen und das Ergebnis in die Spec schreiben.
@@ -0,0 +1,199 @@
# T3 Code als NixOS-Modul in m3ta-home
## Ziel
Der T3-Code-Server wird einmal in m3ta-home definiert statt pro Host. Er läuft auf
m3-kratos (`nixos-config`) und AZ-LT-NIX (`AZ-NIX-CLIENTS`) und ist nur aus dem
gerade aktiven NetBird-Netz erreichbar. Zwischen privatem und Firmen-Control-Server
wird zur Laufzeit per NetBird-Profil gewechselt, ohne Rebuild. Von T3 gestartete
Agents committen auf beiden Hosts als `m3ta-chiron`.
## Erfolgskriterien
1. Beide Hosts bauen mit `m3ta.t3code.enable = true`; pro Host sind nur `enable` und `user` nötig.
2. Nach `netbird up --profile <name>` lauscht T3 Code auf der neuen NetBird-IP, ohne manuellen Eingriff.
3. Der Port ist nur über `wt0` offen, und der Server bindet nie an eine andere Adresse.
4. Ein Commit aus einer T3-Session auf AZ-LT-NIX hat `m3ta-chiron` als Author und Committer.
5. Pushes aus einer T3-Session nach `code.m3ta.dev` und `git.az-gruppe.com` nutzen `~/.ssh/m3ta-chiron`.
6. Tea nutzt in Repos beider Instanzen den passenden Token.
## Nicht im Umfang
- m3-hermes behält seinen Dienst und seine Agent-Runtime. Der Host bekommt nur das Overlay aus der neuen Quelle.
- Beide NetBird-Netze gleichzeitig (`services.netbird.clients`).
- Deklarative NetBird-Profile: Sie enthalten die Peer-Registrierung und bleiben imperativ.
- Die übrige NetBird-Konfiguration der Hosts.
## Modul
`modules/nixos/t3code.nix`, exportiert als `nixosModules.t3code`.
| Option | Typ | Default |
| --- | --- | --- |
| `m3ta.t3code.enable` | bool | `false` |
| `m3ta.t3code.user` | str | keiner (Pflichtfeld) |
| `m3ta.t3code.port` | port | `3773` |
| `m3ta.t3code.interface` | str | `"wt0"` |
| `m3ta.t3code.package` | package | `pkgs.llm-agents.t3code` |
| `m3ta.t3code.environmentFile` | null oder absoluter Pfad außerhalb des Stores | `null` |
Eine Assertion verlangt `services.netbird.enable = true`.
`systemd.services.t3code`:
- Läuft als `user` mit Gruppe `users`; `HOME` und `WorkingDirectory` kommen aus `config.users.users.<user>.home`.
- `T3CODE_PORT` kommt aus `port`.
- `environmentFile` wird, falls gesetzt, als `EnvironmentFile` geladen (`KEY=value`-Zeilen, z. B. ein agenix-Secret).
- `path` enthält `/etc/profiles/per-user/<user>` und `/run/current-system/sw`.
- `Restart = "on-failure"`, `RestartSec = 5`.
- `bindsTo`, `after` und `wantedBy` zeigen auf `sys-subsystem-net-devices-<interface>.device`.
- `after` enthält zusätzlich `netbird.service`.
Das Startskript wartet auf die IPv4-Adresse des Interface und führt dann
`t3 serve --host <ip>` per `exec` aus. Kommt innerhalb von 60 Sekunden keine Adresse,
beendet es sich mit Fehler und `Restart` versucht es erneut.
Die Firewall öffnet `networking.firewall.interfaces.<interface>.allowedTCPPorts = [port]`.
Der Import steht in `hosts/common` beider Repos, `enable` und `user` in der Host-Konfiguration.
## Profilwechsel
Die Profile werden einmal pro Host angelegt:
```bash
netbird profile add private
netbird up --profile private --management-url https://<privater-server>
```
Danach genügt `netbird up --profile <name>`. Das Profil `default` ist auf AZ-LT-NIX
der Firmen-Server. `wt0` verschwindet beim Wechsel und entsteht neu, dadurch startet
der Dienst über die Device-Unit neu.
**Bestätigt am 2026-11-02 auf AZ-LT-NIX:** Wechsel zwischen den Netzen über den
NetBird-Client funktioniert, T3 Code folgt ohne Eingriff. Ein Watcher für
Adressänderungen ist nicht nötig.
T3-Clients brauchen pro Netz einen eigenen Eintrag und müssen im selben Netz sein.
Ob pro Adresse neu gepairt werden muss, wird beim Rollout geprüft.
## Agent-Identität
Das Overlay `t3code-agent-identity` wandert aus `nixos-config/overlays/default.nix`
nach m3ta-home und wird als `overlays.t3code-agent-identity` zusätzlich zu den
`m3ta-nixpkgs`-Overlays exportiert. Beide Repos binden es nach
`llm-agents.overlays.shared-nixpkgs` ein, AZ-NIX-CLIENTS zusätzlich nach
`llm-agents-overrides`. Es umhüllt `t3code` und `t3code-desktop`, also gilt die
Identität auch für die Desktop-App.
Die Identität gilt nur für Prozesse, die T3 startet. Die globale Git-Konfiguration
auf AZ-LT-NIX bleibt `Sascha König`. Author und Committer gelten für jedes Remote.
### Mehrere Gitea-Instanzen
`m3ta-chiron` existiert auf zwei Instanzen, jede mit eigenem Token. Das Overlay
bekommt dafür eine Instanzliste statt der festen Werte für `code.m3ta.dev`:
| Name | URL | SSH | Token-Datei |
| --- | --- | --- | --- |
| `m3ta` | `https://code.m3ta.dev` | `gitea@code.m3ta.dev:22` | `/run/agenix/agent-gitea-token-m3ta` |
| `az` | `https://git.az-gruppe.com` | `gitea@git.az-gruppe.com:2022` | `/run/agenix/agent-gitea-token-az` |
Daraus erzeugt das Overlay:
- **tea:** Der Wrapper schreibt pro lesbarer Token-Datei einen Login. Tea wählt den Login selbst anhand des Hosts im Git-Remote (`MatchLogins`), der Token geht also nur an seine Instanz. Fehlt eine Datei, entfällt nur dieser Login. `default: true` trägt der erste erzeugte Login.
- **SSH:** Pro Instanz ein `Host`-Block mit `User gitea`, Port, `IdentityFile ~/.ssh/m3ta-chiron` und `IdentitiesOnly yes`. Alle anderen Hosts nutzen weiter `~/.ssh/config`.
- **Known Hosts:** Die Host-Keys beider Instanzen, für `git.az-gruppe.com` als `[git.az-gruppe.com]:2022`.
Eine Instanz, die nicht in der Liste steht, bekommt weder SSH-Einstellungen noch Token.
Beide Accounts nutzen denselben Schlüssel `~/.ssh/m3ta-chiron` pro Host.
### Secrets
Pro Instanz gibt es eine eigene Datei, damit sich Tokens einzeln rotieren lassen und
der Arbeits-Token nur auf den Hosts liegt, die ihn brauchen.
| Repo | Datei | `publicKeys` | Hosts |
| --- | --- | --- | --- |
| AZ-NIX-CLIENTS | `secrets/agent-gitea-token-m3ta.age` | `[AZ-LT-NIX sascha.koenig]` | AZ-LT-NIX |
| AZ-NIX-CLIENTS | `secrets/agent-gitea-token-az.age` | `[AZ-LT-NIX sascha.koenig]` | AZ-LT-NIX |
| nixos-config | `secrets/agent-gitea-token-m3ta.age` | wie bisher `hermes-gitea-token` | m3-kratos, m3-hermes |
| nixos-config | `secrets/agent-gitea-token-az.age` | `[m3-kratos] ++ users` | m3-kratos |
m3-hermes bekommt den Arbeits-Token nicht.
In nixos-config ersetzt die neue Datei `hermes-gitea-token.age`; der Inhalt bleibt
gleich. Alle Tokens gehören dem Account `m3ta-chiron` der jeweiligen Instanz.
### Voraussetzungen
| Was | Wie | Durch |
| --- | --- | --- |
| `~/.ssh/m3ta-chiron` auf AZ-LT-NIX | `ssh-keygen -t ed25519 -N "" -C chiron-t3-az-lt-nix -f ~/.ssh/m3ta-chiron` | Sascha |
| `~/.ssh/m3ta-chiron` auf m3-kratos | Vorhandenen Schlüssel prüfen, sonst wie oben mit `-C chiron-t3-m3-kratos` anlegen | Sascha |
| Public Keys | Beide Hosts beim Account `m3ta-chiron` auf beiden Instanzen eintragen | Sascha |
| Erreichbarkeit | Von m3-kratos `ssh -T -p 2022 gitea@git.az-gruppe.com` testen | Sascha |
| Tokens und `.age`-Dateien | Pro Instanz einen Token erzeugen und mit `agenix -e` verschlüsseln | Sascha |
| agenix-Einträge in den Host-`secrets.nix` | Owner ist der jeweilige T3-User | Implementierung |
### Korrektur an `coding.agents.gitIdentity`
`profiles/sets/coding/agents/agents.nix` setzt `sshKey` fest auf
`/home/m3tam3re/.ssh/gitea`. Auf AZ-LT-NIX steht dieser Pfad deshalb schon heute in
`GIT_SSH_COMMAND` in `hm-session-vars.sh`, obwohl die Datei dort nicht existiert.
- `agents.nix` setzt den Wert per `lib.mkDefault`.
- AZ-LT-NIX setzt `coding.agents.gitIdentity.sshKey = "/home/sascha.koenig/.ssh/m3ta-chiron"`.
Dieselbe `gitIdentity` exportiert `GIT_AUTHOR_*` und `GIT_SSH_COMMAND` für alle Shells,
die `hm-session-vars.sh` laden. In Nushell sind die Variablen nicht gesetzt. In Shells,
die die Datei laden, committet und pusht auf AZ-LT-NIX also auch manuelles Git als
`m3ta-chiron`. Dieses Verhalten bleibt unverändert.
## Änderungen pro Repo
**m3ta-home**
- Neu: `modules/nixos/t3code.nix`
- `flake.nix`: Outputs `nixosModules.t3code` und `overlays.t3code-agent-identity`
- `agents.nix`: `sshKey` per `mkDefault`
**nixos-config**
- Flake-Input `m3ta-home` aktualisieren, Modul und Overlay aus m3ta-home einbinden
- Lokales Overlay und `hosts/m3-kratos/services/t3code.nix` entfernen
- m3-kratos: `m3ta.t3code = { enable = true; user = "m3tam3re"; port = config.m3ta.ports.get "t3code"; };`
- `hermes-gitea-token` durch `agent-gitea-token-m3ta` ersetzen (`secrets.nix`, m3-kratos, m3-hermes)
- `agent-gitea-token-az` ergänzen (`secrets.nix`, m3-kratos)
**AZ-NIX-CLIENTS**
- Flake-Input `m3ta-home` aktualisieren, Modul und Overlay einbinden
- `t3code = 3773` in `hosts/common/ports.nix`
- AZ-LT-NIX: `m3ta.t3code`, `gitIdentity.sshKey`, beide Secret-Einträge
- `secrets.nix`: Einträge für beide Tokens
Der lokale `nixos-config`-Klon ist 112 Commits hinter `origin/master` und hat eine
lokale Änderung an `secrets/rustfs-secret-key.age`. Die Arbeit dort startet in einem
eigenen Worktree auf Basis von `origin/master`.
## Reihenfolge
1. Prüfung des `wt0`-Verhaltens durch Sascha, weil die Firmenverbindung dabei kurz wegfällt.
2. m3ta-home implementieren.
3. Beide Hosts mit `--override-input m3ta-home path:…` bauen, ohne `switch`.
4. Schlüssel und Secret für AZ-LT-NIX anlegen (siehe Voraussetzungen).
5. Deployment auf AZ-LT-NIX, dann m3-kratos.
## Fehlerfälle
- **Keine Adresse auf `wt0`:** Das Startskript scheitert nach 60 Sekunden, systemd versucht es erneut.
- **NetBird getrennt:** Der Dienst stoppt mit `wt0` und startet nur mit `wt0` wieder. T3 Code ist dann offline, aber nie außerhalb des Mesh erreichbar.
- **Schlüssel fehlt:** Der Push zu einer der beiden Instanzen scheitert, es gibt keinen Rückfall auf einen persönlichen Schlüssel.
- **Token fehlt:** T3 erkennt die betroffene Instanz nicht als Gitea. Commits und Pushes funktionieren weiter, Change Requests nicht. Die andere Instanz ist nicht betroffen.
## Prüfung
- `nix eval` und `nixos-rebuild build` für AZ-LT-NIX und m3-kratos.
- Nach dem Deployment: Kriterien 2 bis 6, je Profil mit `ss -ltnp`, je Instanz mit einem Testcommit und `tea repos`.
Generated
+191 -219
View File
@@ -2,17 +2,14 @@
"nodes": { "nodes": {
"agenix": { "agenix": {
"inputs": { "inputs": {
"darwin": "darwin", "nixpkgs": "nixpkgs"
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1770165109, "lastModified": 1792507013,
"narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=", "narHash": "sha256-8tKjSQajD3mUND1GaAuaWTcuyUpgcGsh5V+l4ibzC7U=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "b027ee29d959fda4b60b57566d64c98a202e0feb", "rev": "5e5b88a0c8e56f291a108c2fe9934054d9745b2e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -21,36 +18,16 @@
"type": "github" "type": "github"
} }
}, },
"agent-lib": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1781348569,
"narHash": "sha256-1BJtmKSqtD0CD753ZE37RgxvCJK6Iw3iKLDDaS8trY4=",
"ref": "refs/heads/master",
"rev": "75a2ed2533b4d6d8e4a34acd37e83d98d81a5fb0",
"revCount": 30,
"type": "git",
"url": "ssh://gitea@code.m3ta.dev/m3tam3re/agent-lib"
},
"original": {
"type": "git",
"url": "ssh://gitea@code.m3ta.dev/m3tam3re/agent-lib"
}
},
"agents": { "agents": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1780133320, "lastModified": 1783016143,
"narHash": "sha256-8AiN9tV9PBb5xblJiPlhumBbKj61qLjzqXXFtkj3vvY=", "narHash": "sha256-3qejDAo4g2XfzTyWCaX8RVKH17JXnw/fujsbXQA+Mzc=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "920c00313ae242bd93275c30131b9ab1e52ee2fb", "rev": "83284d752d2ac325d4bf3ab7b38acad1c2fffe3a",
"revCount": 88, "revCount": 98,
"type": "git", "type": "git",
"url": "ssh://gitea@code.m3ta.dev/m3tam3re/AGENTS" "url": "ssh://gitea@code.m3ta.dev/m3tam3re/AGENTS"
}, },
@@ -62,11 +39,11 @@
"agents_2": { "agents_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1780133320, "lastModified": 1783016143,
"narHash": "sha256-8AiN9tV9PBb5xblJiPlhumBbKj61qLjzqXXFtkj3vvY=", "narHash": "sha256-3qejDAo4g2XfzTyWCaX8RVKH17JXnw/fujsbXQA+Mzc=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "920c00313ae242bd93275c30131b9ab1e52ee2fb", "rev": "83284d752d2ac325d4bf3ab7b38acad1c2fffe3a",
"revCount": 88, "revCount": 98,
"type": "git", "type": "git",
"url": "https://code.m3ta.dev/m3tam3re/AGENTS" "url": "https://code.m3ta.dev/m3tam3re/AGENTS"
}, },
@@ -99,55 +76,73 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1774505501, "lastModified": 1785979955,
"narHash": "sha256-7UiRrDptj7yuEFwToOfdunUMz/i3jRLR7CmMoYQjq6k=", "narHash": "sha256-OP96Ak4OBydR98keoNYKdGY8j+wrIys0LafSZgwS20g=",
"owner": "basecamp", "owner": "basecamp",
"repo": "basecamp-cli", "repo": "basecamp-cli",
"rev": "f087e6ef84002503d0dbc75ea1c8c928a8928d9e", "rev": "61a5591de1da9bc99c56b8072a4d6bad2c9b9e47",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "basecamp", "owner": "basecamp",
"ref": "v0.7.2", "ref": "v0.9.0",
"repo": "basecamp-cli", "repo": "basecamp-cli",
"type": "github" "type": "github"
} }
}, },
"darwin": { "buzz": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"agenix", "m3ta-nixpkgs",
"nixpkgs" "nixpkgs"
] ],
"rust-overlay": "rust-overlay",
"treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1744478979, "lastModified": 1792485075,
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", "narHash": "sha256-o04WvscL+MhtarpbluifQZLA6lIP3B0g6NDUWaM/asc=",
"owner": "lnl7", "owner": "mulatta",
"repo": "nix-darwin", "repo": "buzz.nix",
"rev": "43975d782b418ebf4969e9ccba82466728c2851b", "rev": "22a9f566d21317181b4b40601570e81a02ff2d8c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lnl7", "owner": "mulatta",
"ref": "master", "repo": "buzz.nix",
"repo": "nix-darwin", "type": "github"
}
},
"dank-qml-common": {
"flake": false,
"locked": {
"lastModified": 1792513666,
"narHash": "sha256-RDqPdPrM5lnwRrfFGLz3IwgTjCV2Ie+nrTD3ldj1t/s=",
"owner": "duxlabs-dev",
"repo": "dux-qml-common",
"rev": "ebf5e6c002da1bdaa4aaa2f319fea7b8507abc42",
"type": "github"
},
"original": {
"owner": "duxlabs-dev",
"repo": "dux-qml-common",
"type": "github" "type": "github"
} }
}, },
"dms": { "dms": {
"inputs": { "inputs": {
"dank-qml-common": "dank-qml-common",
"flake-compat": "flake-compat",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"quickshell": "quickshell"
}, },
"locked": { "locked": {
"lastModified": 1777431599, "lastModified": 1792523829,
"narHash": "sha256-g6r/Gx8PTDzO3jCNzzySA+Ff1lmLF9nDlMCNyyoQjoE=", "narHash": "sha256-hyWdbsyOGXsJxvXG4Tqg0uRI1s3JwPi8DKyWips3Ta8=",
"owner": "AvengeMedia", "owner": "AvengeMedia",
"repo": "DankMaterialShell", "repo": "DankMaterialShell",
"rev": "eb5afcdc40ea5446c27e18552ff4a19f9daf9484", "rev": "9b413296b16721f7679fb62e624cb1ed2433fa58",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -164,11 +159,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781317940, "lastModified": 1792981560,
"narHash": "sha256-uMVOhV6pVPgm2hn1WGEbIcJRWjnsyWKy8PHCUn0++iI=", "narHash": "sha256-wTMsaavNJwgGOX991oIa6xgDWHwJnWdi9bwwQsjGkAg=",
"owner": "AvengeMedia", "owner": "AvengeMedia",
"repo": "dms-plugin-registry", "repo": "dms-plugin-registry",
"rev": "4ab59f3da3df33bf106045b856db8de875cc42c6", "rev": "cb788da6d2e6cf20205784c0baca041e48183612",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -177,6 +172,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@@ -185,11 +196,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772408722, "lastModified": 1782949081,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -222,24 +233,26 @@
"hermes-agent": { "hermes-agent": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"home-manager": "home-manager",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"npm-lockfile-fix": "npm-lockfile-fix", "npm-lockfile-fix": "npm-lockfile-fix",
"pyproject-build-systems": "pyproject-build-systems", "pyproject-build-systems": "pyproject-build-systems",
"pyproject-nix": "pyproject-nix_2", "pyproject-nix": "pyproject-nix",
"uv2nix": "uv2nix_2" "uv2nix": "uv2nix"
}, },
"locked": { "locked": {
"lastModified": 1781346807, "lastModified": 1788204567,
"narHash": "sha256-ytT4ojx0qFW4b/oYeW+MkmaA3b/BZ9pqkPmpAg8j1gg=", "narHash": "sha256-Ii9xP2fKUpvCcwWZuxJ0g3CZ+IL2UZH14pUNvBfdclc=",
"owner": "NousResearch", "owner": "NousResearch",
"repo": "hermes-agent", "repo": "hermes-agent",
"rev": "2a5dc0ef3df433a36abed9ee544ea067d807c438", "rev": "29112bef099274229cadff79cdff7bf7b99c4b77",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NousResearch", "owner": "NousResearch",
"ref": "v2026.8.31",
"repo": "hermes-agent", "repo": "hermes-agent",
"type": "github" "type": "github"
} }
@@ -247,16 +260,16 @@
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"agenix", "hermes-agent",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1745494811, "lastModified": 1786487128,
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", "narHash": "sha256-ad60hrRVhH/bo3Jl1YLzO+QcS3mUNZr9LNJdzhMO2P4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", "rev": "f404edbfa4117810c96b97048299242fc50e5362",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -272,11 +285,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781305496, "lastModified": 1792896866,
"narHash": "sha256-g8Vv4Qfc7n+lgov97REu3X6BeJtvYY0hlSUZR1GrGQQ=", "narHash": "sha256-/0tELNnhdSnP+bHSdWiEe6KpfSwi6WrTnT9cm/jNkjA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c87a39aa979acc4848016d2220c6238390d84779", "rev": "c216bf5a1f173b0481bd5c8c489ebe5595ecc68c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -289,18 +302,19 @@
"inputs": { "inputs": {
"agents": "agents_2", "agents": "agents_2",
"basecamp": "basecamp", "basecamp": "basecamp",
"buzz": "buzz",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-master": "nixpkgs-master", "nixpkgs-master": "nixpkgs-master",
"openspec": "openspec" "opencode": "opencode"
}, },
"locked": { "locked": {
"lastModified": 1781153970, "lastModified": 1792997202,
"narHash": "sha256-OtC89zreW6Api7wpF5u76Jvkn8uQJiM+0yFFn/r+rj8=", "narHash": "sha256-tHNAo+Yc/7oUzxvnkAnximNt4MPRy2sW0tQAZ1Jq6oo=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "8fae0726a53ecabb04f4a0931a17a25de6a05fbf", "rev": "72695e2ef0b4f476ea28979dfdcd5a659d9496ce",
"revCount": 324, "revCount": 411,
"type": "git", "type": "git",
"url": "ssh://gitea@code.m3ta.dev/m3tam3re/nixpkgs" "url": "ssh://gitea@code.m3ta.dev/m3tam3re/nixpkgs"
}, },
@@ -330,16 +344,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1754028485, "lastModified": 1790340521,
"narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", "narHash": "sha256-cRrWlIjVRJ6BHDr9caUdXsZ3owzWIKYHpNmGPHBInIU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "59e69648d345d6e8fef86158c555730fa12af9de", "rev": "f5c082a40f7571c266e74e80ae2e68aadd8a9fc7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "nixos-26.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -361,11 +375,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1781153468, "lastModified": 1792653584,
"narHash": "sha256-ZBRmjFtJn/XmHBV230OSabKQqxOoOJunJmBtSt1sLs0=", "narHash": "sha256-vniEjRZ2skWqpreoaSJt7MCXDc/uZI/+ZDdLSa1/h6I=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cd265fd6b43f2ec1257c2e400f648895d2ad7ccd", "rev": "6c21ae394d8839a9d4cad6e2fb2f312ebef0447b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -393,11 +407,27 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1781074563, "lastModified": 1790510107,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", "narHash": "sha256-EVMNYv7hYDDD9TGVT/hIyTYgpiXA8y3m5xIEIxuGNU0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", "rev": "3181085bfd08663b6b9e60bc7a8395c2aaa741bd",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1792773339,
"narHash": "sha256-rZLrzrC6i+jnTAlvPZHogKDulY7WWDEv9hJeHieO7Zw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3ec636362e1816bc2f0888fa0fa2c69f1bc9e504",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -407,13 +437,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1781074563, "lastModified": 1792773339,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", "narHash": "sha256-rZLrzrC6i+jnTAlvPZHogKDulY7WWDEv9hJeHieO7Zw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", "rev": "3ec636362e1816bc2f0888fa0fa2c69f1bc9e504",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -447,14 +477,14 @@
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1781346642, "lastModified": 1792997485,
"narHash": "sha256-o92OOSMAB08HQgG7pW2BZVIO53Pkv4oAjLk4Iol3Iko=", "narHash": "sha256-f4HoNZ30TvZgK/uaZAxTCGeV3XDW2DPdcuiM1azihKw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "6e4e8d731fbb3831296607d5f88de727cf7bf6de", "rev": "01c200726e3d527b5101b440be0ab19a7f74cba1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -463,24 +493,22 @@
"type": "github" "type": "github"
} }
}, },
"openspec": { "opencode": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": "nixpkgs_3"
"m3ta-nixpkgs",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1780479100, "lastModified": 1792644899,
"narHash": "sha256-VZZ/ukjciXqiebwei2JizyOnxx0T3IeoowFWElKec4o=", "narHash": "sha256-ub192yT1SwxVyf2DHKW34xHJnL/LXRi2jm1IFyZMkqQ=",
"owner": "Fission-AI", "owner": "anomalyco",
"repo": "OpenSpec", "repo": "opencode",
"rev": "1b06fddd59d8e592d5b5794a1970b22867e85b1f", "rev": "c93aaae37157d785f76a8e9a9243a6560e286468",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Fission-AI", "owner": "anomalyco",
"repo": "OpenSpec", "ref": "dev",
"repo": "opencode",
"type": "github" "type": "github"
} }
}, },
@@ -490,15 +518,21 @@
"hermes-agent", "hermes-agent",
"nixpkgs" "nixpkgs"
], ],
"pyproject-nix": "pyproject-nix", "pyproject-nix": [
"uv2nix": "uv2nix" "hermes-agent",
"pyproject-nix"
],
"uv2nix": [
"hermes-agent",
"uv2nix"
]
}, },
"locked": { "locked": {
"lastModified": 1772555609, "lastModified": 1785115949,
"narHash": "sha256-3BA3HnUvJSbHJAlJj6XSy0Jmu7RyP2gyB/0fL7XuEDo=", "narHash": "sha256-8AM37BfyGaL2v/SZyg4PupRxJ01Y4htvM+WrTjWrPpo=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "build-system-pkgs", "repo": "build-system-pkgs",
"rev": "c37f66a953535c394244888598947679af231863", "rev": "62c0d86027edb1c4f39a5facc09876348144f7c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -511,37 +545,15 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hermes-agent", "hermes-agent",
"pyproject-build-systems",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1769936401, "lastModified": 1784591072,
"narHash": "sha256-kwCOegKLZJM9v/e/7cqwg1p/YjjTAukKPqmxKnAZRgA=", "narHash": "sha256-zP/WaDxrRu8GANZM61+V2LT/7ycEEdoyLWn7M6WzU7M=",
"owner": "nix-community",
"repo": "pyproject.nix",
"rev": "b0d513eeeebed6d45b4f2e874f9afba2021f7812",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "pyproject.nix",
"type": "github"
}
},
"pyproject-nix_2": {
"inputs": {
"nixpkgs": [
"hermes-agent",
"nixpkgs"
]
},
"locked": {
"lastModified": 1772865871,
"narHash": "sha256-/ZTSg97aouL0SlPHaokA4r3iuH9QzHVuWPACD2CUCFY=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "pyproject.nix", "repo": "pyproject.nix",
"rev": "e537db02e72d553cea470976b9733581bcf5b3ed", "rev": "e3b599ca2e7fcf93d4edf65d7f19bbf6491724f3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -550,54 +562,9 @@
"type": "github" "type": "github"
} }
}, },
"pyproject-nix_3": {
"inputs": {
"nixpkgs": [
"hermes-agent",
"uv2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1771518446,
"narHash": "sha256-nFJSfD89vWTu92KyuJWDoTQJuoDuddkJV3TlOl1cOic=",
"owner": "pyproject-nix",
"repo": "pyproject.nix",
"rev": "eb204c6b3335698dec6c7fc1da0ebc3c6df05937",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "pyproject.nix",
"type": "github"
}
},
"quickshell": {
"inputs": {
"nixpkgs": [
"dms",
"nixpkgs"
]
},
"locked": {
"lastModified": 1776854048,
"narHash": "sha256-lLbV66V3RMNp1l8/UelmR4YzoJ5ONtgvEtiUMJATH/o=",
"ref": "refs/heads/master",
"rev": "783c953987dc56ff0601abe6845ed96f1d00495a",
"revCount": 806,
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
},
"original": {
"rev": "783c953987dc56ff0601abe6845ed96f1d00495a",
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"agent-lib": "agent-lib",
"agents": "agents", "agents": "agents",
"dms": "dms", "dms": "dms",
"dms-plugin-registry": "dms-plugin-registry", "dms-plugin-registry": "dms-plugin-registry",
@@ -605,22 +572,51 @@
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"m3ta-nixpkgs": "m3ta-nixpkgs", "m3ta-nixpkgs": "m3ta-nixpkgs",
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"nur": "nur" "nur": "nur"
} }
}, },
"systems": { "rust-overlay": {
"inputs": {
"nixpkgs": [
"m3ta-nixpkgs",
"buzz",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1792219666,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-RMO08tKD+hFIL5ryWi85VY4aHE5oIpdV1h4kVFctOkw=",
"owner": "nix-systems", "owner": "oxalica",
"repo": "default", "repo": "rust-overlay",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "a110337465cfb76e3806b81b9db3094c3e6e770a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "oxalica",
"repo": "default", "repo": "rust-overlay",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"m3ta-nixpkgs",
"buzz",
"nixpkgs"
]
},
"locked": {
"lastModified": 1791885023,
"narHash": "sha256-C3alQ2MEt0zVrUSho5NUDo3jmhbff72++bfwoqT9Omo=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "0d6d739a833ba9a9c93034862e4a7b061a062a1c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github" "type": "github"
} }
}, },
@@ -628,43 +624,19 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hermes-agent", "hermes-agent",
"pyproject-build-systems",
"nixpkgs" "nixpkgs"
], ],
"pyproject-nix": [ "pyproject-nix": [
"hermes-agent", "hermes-agent",
"pyproject-build-systems",
"pyproject-nix" "pyproject-nix"
] ]
}, },
"locked": { "locked": {
"lastModified": 1770770348, "lastModified": 1785277507,
"narHash": "sha256-A2GzkmzdYvdgmMEu5yxW+xhossP+txrYb7RuzRaqhlg=", "narHash": "sha256-9Tq3UDX2hD/aveW/HvkBlAmEwJTOlY5HQXJM+L5BGmE=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "uv2nix", "repo": "uv2nix",
"rev": "5d1b2cb4fe3158043fbafbbe2e46238abbc954b0", "rev": "5a836d395cbf5fc22670eb98dd4aa4fc4d406977",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "uv2nix",
"type": "github"
}
},
"uv2nix_2": {
"inputs": {
"nixpkgs": [
"hermes-agent",
"nixpkgs"
],
"pyproject-nix": "pyproject-nix_3"
},
"locked": {
"lastModified": 1773039484,
"narHash": "sha256-+boo33KYkJDw9KItpeEXXv8+65f7hHv/earxpcyzQ0I=",
"owner": "pyproject-nix",
"repo": "uv2nix",
"rev": "b68be7cfeacbed9a3fa38a2b5adc0cfb81d9bb1f",
"type": "github" "type": "github"
}, },
"original": { "original": {
+12 -9
View File
@@ -13,6 +13,7 @@
m3ta-nixpkgs = { m3ta-nixpkgs = {
url = "git+ssh://gitea@code.m3ta.dev/m3tam3re/nixpkgs"; url = "git+ssh://gitea@code.m3ta.dev/m3tam3re/nixpkgs";
# url = "path:/home/m3tam3re/p/NIX/nixpkgs";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -21,14 +22,8 @@
url = "git+ssh://gitea@code.m3ta.dev/m3tam3re/AGENTS"; url = "git+ssh://gitea@code.m3ta.dev/m3tam3re/AGENTS";
}; };
agent-lib = {
# url = "path:/home/m3tam3re/p/NIX/agent-lib";
url = "git+ssh://gitea@code.m3ta.dev/m3tam3re/agent-lib";
inputs.nixpkgs.follows = "nixpkgs";
};
hermes-agent = { hermes-agent = {
url = "github:NousResearch/hermes-agent"; url = "github:NousResearch/hermes-agent/v2026.8.31";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -55,6 +50,10 @@
selfPath = self.outPath; selfPath = self.outPath;
}; };
# NixOS modules — import in nixos-config via:
# imports = [ inputs.m3ta-home.nixosModules.t3code ];
nixosModules.t3code = ./modules/nixos/t3code.nix;
# Library functions — use in nixos-config via: # Library functions — use in nixos-config via:
# m3ta-lib = inputs.m3ta-home.lib; # m3ta-lib = inputs.m3ta-home.lib;
# imports = [ (m3ta-lib.mkHome { ... }) ]; # imports = [ (m3ta-lib.mkHome { ... }) ];
@@ -63,7 +62,11 @@
selfPath = self.outPath; selfPath = self.outPath;
}; };
# Overlays (re-exports from m3ta-nixpkgs) # Overlays (re-exports from m3ta-nixpkgs, plus our own)
overlays = inputs.m3ta-nixpkgs.overlays; overlays =
inputs.m3ta-nixpkgs.overlays
// {
t3code-agent-identity = import ./overlays/t3code-agent-identity.nix {};
};
}; };
} }
+1 -8
View File
@@ -6,11 +6,4 @@
{ {
inputs, inputs,
selfPath, selfPath,
}: let }: import ./mkHome.nix {inherit inputs selfPath;}
mkHomeLib = import ./mkHome.nix {inherit inputs selfPath;};
in
mkHomeLib
// {
mkHermesSkillsDir = {system, ...} @ args:
inputs.agent-lib.lib.${system}.mkHermesSkillsDir (builtins.removeAttrs args ["system"]);
}
-1
View File
@@ -84,7 +84,6 @@ in {
imports = imports =
[ [
# External Home Manager modules required by selectable profiles # External Home Manager modules required by selectable profiles
inputs.agent-lib.homeManagerModules.default
inputs.dms.homeModules.default inputs.dms.homeModules.default
inputs.dms-plugin-registry.homeModules.default inputs.dms-plugin-registry.homeModules.default
inputs.nix-colors.homeManagerModules.default inputs.nix-colors.homeManagerModules.default
-1
View File
@@ -12,7 +12,6 @@
default = { default = {
imports = [ imports = [
# External modules # External modules
inputs.agent-lib.homeManagerModules.default
inputs.dms.homeModules.default inputs.dms.homeModules.default
inputs.dms-plugin-registry.homeModules.default inputs.dms-plugin-registry.homeModules.default
inputs.nix-colors.homeManagerModules.default inputs.nix-colors.homeManagerModules.default
+23
View File
@@ -0,0 +1,23 @@
# Start T3 Code on the interface's current IPv4 address. The address changes
# with the NetBird profile, so it cannot be a Nix value.
# Usage: t3code-serve.sh <interface> <t3 binary>
interface="$1"
t3="$2"
timeout="${T3CODE_ADDR_TIMEOUT:-60}"
address=""
for ((waited = 0; waited < timeout; waited++)); do
line="$(ip -4 -o addr show dev "$interface" 2>/dev/null || true)"
if [[ "$line" =~ inet[[:space:]]+([0-9.]+)/ ]]; then
address="${BASH_REMATCH[1]}"
break
fi
sleep 1
done
if [[ -z "$address" ]]; then
echo "no IPv4 address on $interface after ${timeout}s" >&2
exit 1
fi
exec "$t3" serve --host "$address"
+109
View File
@@ -0,0 +1,109 @@
# T3 Code server, reachable from the active NetBird network only.
#
# The service follows the mesh interface: it stops when NetBird removes the
# interface and starts again with the new address when a profile comes up
# (`netbird up --profile <name>`). It owns ~/.t3, so a desktop app on the same
# host must connect as a client with its local environment off.
#
# Wanted by the device rather than multi-user.target, so a host without NetBird
# connection does not wait for it at boot. A first deploy with the interface
# already up needs one `systemctl start t3code`.
{
config,
lib,
pkgs,
utils,
...
}: let
cfg = config.m3ta.t3code;
device = "${utils.escapeSystemdPath "/sys/subsystem/net/devices/${cfg.interface}"}.device";
home = config.users.users.${cfg.user}.home;
serve = pkgs.writeShellApplication {
name = "t3code-serve";
runtimeInputs = [pkgs.iproute2 pkgs.coreutils];
text = builtins.readFile ./t3code-serve.sh;
};
in {
options.m3ta.t3code = {
enable = lib.mkEnableOption "the T3 Code server on the NetBird interface";
user = lib.mkOption {
type = lib.types.str;
description = "User running the server; the harnesses come from this user's profile.";
example = "m3tam3re";
};
port = lib.mkOption {
type = lib.types.port;
default = 3773;
description = "Port for the HTTP/WebSocket server.";
};
interface = lib.mkOption {
type = lib.types.str;
default = "wt0";
description = "NetBird interface to bind to and open the port on.";
};
package = lib.mkOption {
type = lib.types.package;
default = pkgs.llm-agents.t3code;
defaultText = lib.literalExpression "pkgs.llm-agents.t3code";
description = "T3 Code package.";
};
environmentFile = lib.mkOption {
type = lib.types.nullOr (lib.types.pathWith {
inStore = false;
absolute = true;
});
default = null;
example = "/run/agenix/t3code-env";
description = ''
File with `KEY=value` lines loaded into the server's environment
(systemd `EnvironmentFile`), e.g. tokens for the harnesses. Keep it
outside the Nix store, for example as an agenix secret.
'';
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = config.services.netbird.enable;
message = "m3ta.t3code requires services.netbird.enable";
}
];
systemd.services.t3code = {
description = "T3 Code server";
after = [device "netbird.service"];
bindsTo = [device];
wantedBy = [device];
serviceConfig = {
User = cfg.user;
Group = "users";
WorkingDirectory = home;
ExecStart = "${serve}/bin/t3code-serve ${cfg.interface} ${cfg.package}/bin/t3";
Restart = "on-failure";
RestartSec = "5";
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
};
environment = {
T3CODE_PORT = toString cfg.port;
HOME = home;
};
# The harnesses come from the user's profile, not from the service.
path = [
"/etc/profiles/per-user/${cfg.user}"
"/run/current-system/sw"
];
};
networking.firewall.interfaces.${cfg.interface}.allowedTCPPorts = [cfg.port];
};
}
+99
View File
@@ -0,0 +1,99 @@
#!/usr/bin/env bash
# Eval and start-script checks for nixosModules.t3code.
# Usage: t3code.test.sh
set -euo pipefail
here="$(cd "$(dirname "$0")" && pwd)"
repo="$(cd "$here/../.." && pwd)"
fail=0
check() { # name, got, want
if [[ "$2" == "$3" ]]; then echo "ok $1"; else echo "FAIL $1: got '$2', want '$3'"; fail=1; fi
}
contains() { # name, haystack, needle
if [[ "$2" == *"$3"* ]]; then echo "ok $1"; else echo "FAIL $1: missing '$3' in '$2'"; fail=1; fi
}
# ev <module-attrs> <expression over `config`>; prints JSON, or the error on stderr.
ev() {
nix eval --impure --json --expr "
let
flake = builtins.getFlake \"path:$repo\";
system = flake.inputs.nixpkgs.lib.nixosSystem {
modules = [
flake.nixosModules.t3code
({pkgs, ...}: {
nixpkgs.hostPlatform = \"x86_64-linux\";
nixpkgs.overlays = [(final: prev: {llm-agents.t3code = final.hello;})];
boot.loader.grub.enable = false;
fileSystems.\"/\" = {device = \"none\"; fsType = \"tmpfs\";};
system.stateVersion = \"25.05\";
users.users.alice = {isNormalUser = true; home = \"/home/alice\";};
})
($1)
];
};
config = system.config;
in $2"
}
on='{services.netbird.enable = true; m3ta.t3code = {enable = true; user = "alice";};}'
dev="sys-subsystem-net-devices-wt0.device"
check "bindsTo" "$(ev "$on" 'config.systemd.services.t3code.bindsTo')" "[\"$dev\"]"
check "wantedBy" "$(ev "$on" 'config.systemd.services.t3code.wantedBy')" "[\"$dev\"]"
contains "after device" "$(ev "$on" 'config.systemd.services.t3code.after')" "$dev"
contains "after netbird" "$(ev "$on" 'config.systemd.services.t3code.after')" "netbird.service"
check "user" "$(ev "$on" 'config.systemd.services.t3code.serviceConfig.User')" '"alice"'
check "port env" "$(ev "$on" 'config.systemd.services.t3code.environment.T3CODE_PORT')" '"3773"'
check "home env" "$(ev "$on" 'config.systemd.services.t3code.environment.HOME')" '"/home/alice"'
check "firewall" "$(ev "$on" 'config.networking.firewall.interfaces.wt0.allowedTCPPorts')" '[3773]'
contains "path has user profile" \
"$(ev "$on" 'map toString config.systemd.services.t3code.path')" "/etc/profiles/per-user/alice"
custom='{services.netbird.enable = true; m3ta.t3code = {enable = true; user = "alice"; port = 4000; interface = "nb-x";};}'
check "custom port" "$(ev "$custom" 'config.networking.firewall.interfaces."nb-x".allowedTCPPorts')" '[4000]'
contains "custom interface" "$(ev "$custom" 'config.systemd.services.t3code.bindsTo')" 'nb\\x2dx.device'
check "disabled has no service" \
"$(ev '{services.netbird.enable = true;}' 'config.systemd.services ? t3code')" "false"
err="$(ev '{m3ta.t3code = {enable = true; user = "alice";};}' 'config.system.build.toplevel.drvPath' 2>&1 || true)"
contains "netbird assertion" "$err" "m3ta.t3code requires services.netbird.enable"
err="$(ev '{services.netbird.enable = true; m3ta.t3code.enable = true;}' 'config.systemd.services.t3code.serviceConfig.User' 2>&1 || true)"
contains "user is required" "$err" "m3ta.t3code.user"
# ── Start script, with stubs for ip and t3 ──
stubs="$(mktemp -d)"
trap 'rm -rf "$stubs"' EXIT
cat >"$stubs/t3" <<'EOF'
#!/usr/bin/env bash
echo "t3 $*"
EOF
chmod +x "$stubs/t3"
run() { # ip stub body
cat >"$stubs/ip" <<EOF
#!/usr/bin/env bash
$1
EOF
chmod +x "$stubs/ip"
PATH="$stubs:$PATH" T3CODE_ADDR_TIMEOUT=1 bash "$here/t3code-serve.sh" wt0 "$stubs/t3" 2>&1
}
check "binds the interface address" \
"$(run 'echo "5: wt0 inet 100.1.2.3/16 brd 100.1.255.255 scope global wt0"')" "t3 serve --host 100.1.2.3"
set +e
out="$(run 'exit 0')"; rc=$?
set -e
check "no address exits 1" "$rc" "1"
if [[ "$out" == *"t3 serve"* ]]; then echo "FAIL no address must not start t3: $out"; fail=1; else echo "ok no address does not start t3"; fi
set +e
out="$(run 'echo "Device does not exist" >&2; exit 1')"; rc=$?
set -e
check "missing interface exits 1" "$rc" "1"
exit "$fail"
+120
View File
@@ -0,0 +1,120 @@
# T3 Code agents act as the m3ta-chiron bot on every host. Baked into the
# T3 packages rather than a session or service: everything T3 spawns
# inherits it, however T3 was launched (desktop launcher, systemd, shell),
# and any host installing T3 gets it. Must come AFTER shared-nixpkgs.
#
# Push auth needs ~/.ssh/m3ta-chiron on each host, with its pubkey on the
# m3ta-chiron account of each Gitea instance. A missing key fails the push
# instead of falling back to a personal key. Other hosts keep the user's own
# ssh config.
#
# Change requests need one agenix secret per instance, owned by the T3 user.
# Without it T3 cannot recognize that instance as Gitea; the others still work.
{tokenFiles ? {}}: final: prev: let
identity = {
name = "m3ta-chiron";
email = "m3ta-chiron@agentmail.to";
};
instances = [
{
name = "m3ta";
url = "https://code.m3ta.dev";
host = "code.m3ta.dev";
port = 22;
knownHost = "code.m3ta.dev";
hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmmqZ4GgDEXJgj8uYrZAr/EoLIA6LJGkTIyKGQD/60a";
}
{
name = "az";
url = "https://git.az-gruppe.com";
host = "git.az-gruppe.com";
port = 2022;
knownHost = "[git.az-gruppe.com]:2022";
hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIItSijmU5YwcJcoshtmYxpxBaVA4TPaCMk23ws7KDkAH";
}
];
tokenFile = instance: tokenFiles.${instance.name} or "/run/agenix/agent-gitea-token-${instance.name}";
giteaKnownHosts = final.writeText "gitea-known-hosts" (
final.lib.concatMapStrings (instance: "${instance.knownHost} ${instance.hostKey}\n") instances
);
# ssh expands ~ from passwd, so this does not depend on $HOME.
sshConfig = final.writeText "t3-agent-ssh-config" ''
${final.lib.concatMapStrings (instance: ''
Host ${instance.host}
User gitea
Port ${toString instance.port}
IdentityFile ~/.ssh/m3ta-chiron
IdentitiesOnly yes
UserKnownHostsFile ${giteaKnownHosts}
'')
instances}
# Conditional: IdentityFile accumulates across matching blocks, so a
# personal entry for these hosts must not be read.
Host * ${final.lib.concatMapStringsSep " " (instance: "!${instance.host}") instances}
Include ~/.ssh/config
'';
# T3 only recognizes a Gitea on a custom domain through a matching tea
# login, and tea picks the login by the host of the git remote, so a token
# only reaches its own instance. The config lives in a private temp dir per
# call: tokens stay out of the nix store and a personal ~/.config/tea is left
# alone.
agentTea = final.writeShellApplication {
name = "tea";
text = ''
config="$(${final.coreutils}/bin/mktemp -d)"
trap '${final.coreutils}/bin/rm -rf "$config"' EXIT
${final.coreutils}/bin/mkdir "$config/tea"
default=true
${final.lib.concatMapStrings (instance: ''
if [ -r ${tokenFile instance} ]; then
if [ "$default" = true ]; then
printf 'logins:\n' >"$config/tea/config.yml"
fi
printf ' - name: %s\n url: %s\n token: %s\n user: %s\n default: %s\n' \
${instance.name} ${instance.url} "$(${final.coreutils}/bin/cat ${tokenFile instance})" \
${identity.name} "$default" >>"$config/tea/config.yml"
default=false
fi
'')
instances}
XDG_CONFIG_HOME="$config" ${final.tea}/bin/tea "$@"
'';
};
wrapperArgs = final.lib.concatStringsSep " " (final.lib.mapAttrsToList (name: value: "--set ${name} ${final.lib.escapeShellArg value}") {
GIT_AUTHOR_NAME = identity.name;
GIT_AUTHOR_EMAIL = identity.email;
GIT_COMMITTER_NAME = identity.name;
GIT_COMMITTER_EMAIL = identity.email;
JJ_USER = identity.name;
JJ_EMAIL = identity.email;
# bd otherwise falls back to the user's git user.name for its audit trail.
BEADS_ACTOR = identity.name;
GIT_SSH_COMMAND = "${final.openssh}/bin/ssh -F ${sshConfig}";
});
wrapT3 = package:
final.symlinkJoin {
inherit (package) name meta passthru;
paths = [package];
nativeBuildInputs = [final.makeWrapper];
postBuild = ''
for program in $out/bin/*; do
wrapProgram "$program" ${wrapperArgs} --prefix PATH : ${agentTea}/bin
done
'';
};
in {
llm-agents =
prev.llm-agents
// {
t3code = wrapT3 prev.llm-agents.t3code;
t3code-desktop = wrapT3 prev.llm-agents.t3code-desktop;
};
}
+89
View File
@@ -0,0 +1,89 @@
#!/usr/bin/env bash
# Checks for overlays.t3code-agent-identity with a stub t3 that runs its
# arguments inside the wrapper's environment.
# Usage: t3code-agent-identity.test.sh
set -euo pipefail
here="$(cd "$(dirname "$0")" && pwd)"
repo="$(cd "$here/.." && pwd)"
fail=0
contains() { # name, haystack, needle
if [[ "$2" == *"$3"* ]]; then echo "ok $1"; else echo "FAIL $1: missing '$3' in '$2'"; fail=1; fi
}
refute() { # name, haystack, needle
if [[ "$2" == *"$3"* ]]; then echo "FAIL $1: found '$3'"; fail=1; else echo "ok $1"; fi
}
work="$(mktemp -d)"
trap 'rm -rf "$work"' EXIT
secret="fake-token-$$-do-not-leak"
build() { # m3ta token file, az token file
nix build --no-link --print-out-paths --impure --expr "
let
flake = builtins.getFlake \"path:$repo\";
pkgs = import flake.inputs.nixpkgs {
system = \"x86_64-linux\";
overlays = [
(final: prev: {
llm-agents.t3code = final.writeShellScriptBin \"t3\" ''exec \"\$@\"'';
llm-agents.t3code-desktop = final.writeShellScriptBin \"t3-desktop\" ''exec \"\$@\"'';
})
(import $repo/overlays/t3code-agent-identity.nix {
tokenFiles = {m3ta = \"$1\"; az = \"$2\";};
})
];
};
in pkgs.llm-agents.t3code"
}
printf '%s' "$secret" >"$work/token"
both="$(build "$work/token" "$work/token")"
az_only="$(build "$work/missing" "$work/token")"
none="$(build "$work/missing" "$work/missing")"
export TMPDIR="$work/tmp"
mkdir "$TMPDIR"
t3() { "$1/bin/t3" "${@:2}"; }
out="$(t3 "$both" tea logins)"
contains "both: m3ta login" "$out" "https://code.m3ta.dev"
contains "both: az login" "$out" "https://git.az-gruppe.com"
refute "login list hides the token" "$out" "$secret"
out="$(t3 "$az_only" tea logins)"
contains "az only: az login" "$out" "https://git.az-gruppe.com"
refute "az only: no m3ta login" "$out" "code.m3ta.dev"
out="$(t3 "$az_only" tea logins default)"
contains "az only: az is default" "$out" "az"
t3 "$none" tea logins >/dev/null && echo "ok no token: tea still runs" || { echo "FAIL no token: tea failed"; fail=1; }
if [ -n "$(ls -A "$TMPDIR")" ]; then echo "FAIL temp config left behind"; fail=1; else echo "ok temp config removed"; fi
if grep -rqF "$secret" "$both/bin"/; then echo "FAIL token in the store"; fail=1; else echo "ok token not in the wrapper"; fi
sshcmd="$(t3 "$both" printenv GIT_SSH_COMMAND)"
g() { $sshcmd -G "$1"; }
out="$(g git.az-gruppe.com)"
contains "az: port" "$out" "port 2022"
contains "az: user" "$out" "user gitea"
contains "az: key" "$out" "identityfile ~/.ssh/m3ta-chiron"
known="$(echo "$out" | awk '/^userknownhostsfile/ {print $2}')"
contains "az: host key" "$(cat "$known")" "[git.az-gruppe.com]:2022 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIItSijmU5YwcJcoshtmYxpxBaVA4TPaCMk23ws7KDkAH"
out="$(g code.m3ta.dev)"
contains "m3ta: port" "$out" "port 22"
contains "m3ta: user" "$out" "user gitea"
contains "m3ta: key" "$out" "identityfile ~/.ssh/m3ta-chiron"
contains "m3ta: host key" "$(cat "$known")" "code.m3ta.dev ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmmqZ4GgDEXJgj8uYrZAr/EoLIA6LJGkTIyKGQD/60a"
refute "other hosts keep their own key" "$(g example.org)" "m3ta-chiron"
contains "author" "$(t3 "$both" printenv GIT_AUTHOR_NAME)" "m3ta-chiron"
contains "committer" "$(t3 "$both" printenv GIT_COMMITTER_EMAIL)" "m3ta-chiron@agentmail.to"
contains "beads actor" "$(t3 "$both" printenv BEADS_ACTOR)" "m3ta-chiron"
exit "$fail"
+21
View File
@@ -0,0 +1,21 @@
# Ansible — configuration management for rolling out configurations to servers.
# Lives in base so it is available in every identity (private/work) and context.
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.base.cliTools.ansible;
in {
# Enabled by default — base modules are always-on.
options.base.cliTools.ansible.enable = (mkEnableOption "enable Ansible configuration management") // {default = true;};
config = mkIf cfg.enable {
home.packages = with pkgs; [
ansible
ansible-lint
];
};
}
+1 -2
View File
@@ -1,4 +1,4 @@
# Carapace — multi-shell completion engine with Fish, Nushell, and Bash integration. # Carapace — multi-shell completion engine with Nushell and Bash integration.
{ {
config, config,
lib, lib,
@@ -13,7 +13,6 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.carapace = { programs.carapace = {
enable = true; enable = true;
enableFishIntegration = true;
enableNushellIntegration = true; enableNushellIntegration = true;
enableBashIntegration = true; enableBashIntegration = true;
}; };
+1 -1
View File
@@ -1,6 +1,7 @@
# CLI tools aggregator — imports all base command-line utilities. # CLI tools aggregator — imports all base command-line utilities.
{...}: { {...}: {
imports = [ imports = [
./ansible.nix
./bat.nix ./bat.nix
./carapace.nix ./carapace.nix
./direnv.nix ./direnv.nix
@@ -13,7 +14,6 @@
./packages.nix ./packages.nix
./television.nix ./television.nix
./zellij.nix ./zellij.nix
./zellij-ps.nix
./zoxide.nix ./zoxide.nix
]; ];
} }
-1
View File
@@ -13,7 +13,6 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.eza = { programs.eza = {
enable = true; enable = true;
enableFishIntegration = true;
enableBashIntegration = true; enableBashIntegration = true;
extraOptions = ["-l" "--icons" "--git" "-a"]; extraOptions = ["-l" "--icons" "--git" "-a"];
}; };
+32 -26
View File
@@ -2,40 +2,46 @@
{ {
config, config,
lib, lib,
options,
... ...
}: }:
with lib; let with lib; let
cfg = config.base.cliTools.fzf; cfg = config.base.cliTools.fzf;
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
in { in {
# Enabled by default — base modules are always-on. # Enabled by default — base modules are always-on.
options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;}; options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.fzf = { programs.fzf =
enable = true; {
enableFishIntegration = true; enable = true;
colors = { colors = {
"fg" = "#${config.colorScheme.palette.base05}"; "fg" = "#${config.colorScheme.palette.base05}";
"bg" = "#${config.colorScheme.palette.base00}"; "bg" = "#${config.colorScheme.palette.base00}";
"hl" = "#${config.colorScheme.palette.base0E}"; "hl" = "#${config.colorScheme.palette.base0E}";
"fg+" = "#${config.colorScheme.palette.base05}"; "fg+" = "#${config.colorScheme.palette.base05}";
"bg+" = "#${config.colorScheme.palette.base02}"; "bg+" = "#${config.colorScheme.palette.base02}";
"hl+" = "#${config.colorScheme.palette.base0E}"; "hl+" = "#${config.colorScheme.palette.base0E}";
"info" = "#${config.colorScheme.palette.base09}"; "info" = "#${config.colorScheme.palette.base09}";
"prompt" = "#${config.colorScheme.palette.base0B}"; "prompt" = "#${config.colorScheme.palette.base0B}";
"pointer" = "#${config.colorScheme.palette.base08}"; "pointer" = "#${config.colorScheme.palette.base08}";
"marker" = "#${config.colorScheme.palette.base08}"; "marker" = "#${config.colorScheme.palette.base08}";
"spinner" = "#${config.colorScheme.palette.base09}"; "spinner" = "#${config.colorScheme.palette.base09}";
"header" = "#${config.colorScheme.palette.base03}"; "header" = "#${config.colorScheme.palette.base03}";
}; };
defaultOptions = [ defaultOptions = [
"--preview='bat --color=always -n {}'" "--preview='bat --color=always -n {}'"
"--bind 'ctrl-/:toggle-preview'" "--bind 'ctrl-/:toggle-preview'"
"--header 'Press CTRL-Y to copy command into clipboard'" "--header 'Press CTRL-Y to copy command into clipboard'"
"--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'" "--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'"
]; ];
defaultCommand = "fd --type f --exclude .git --follow --hidden"; defaultCommand = "fd --type f --exclude .git --follow --hidden";
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden"; }
}; // (
if options.programs.fzf ? changeDirWidget
then {changeDirWidget.command = changeDirWidgetCommand;}
else {inherit changeDirWidgetCommand;}
);
}; };
} }
-1
View File
@@ -17,7 +17,6 @@ in {
programs.nix-index = { programs.nix-index = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;
enableFishIntegration = true;
enableNushellIntegration = true; enableNushellIntegration = true;
}; };
}; };
-30
View File
@@ -1,30 +0,0 @@
# Zellij-ps — project-aware Zellij session manager from m3ta-nixpkgs.
# Delegates to `cli.zellij-ps` — the home-manager module namespace provided by
# m3ta-nixpkgs. Requires m3ta-nixpkgs overlays to be applied to pkgs
# (via home-manager.useGlobalPkgs = true in NixOS, or overlays in standalone).
{
config,
lib,
...
}:
with lib; let
cfg = config.base.cliTools.zellijPs;
in {
options.base.cliTools.zellijPs = {
# Enabled by default — base modules are always-on.
enable = (mkEnableOption "enable zellij-ps project session manager") // {default = true;};
projectFolders = mkOption {
type = types.listOf types.path;
description = "Project root folders scanned by zellij-ps.";
default = ["${config.home.homeDirectory}/p"];
};
};
config = mkIf cfg.enable {
cli.zellij-ps = {
enable = true;
projectFolders = cfg.projectFolders;
};
};
}
+1 -2
View File
@@ -1,4 +1,4 @@
# Zoxide — smarter cd with Fish and Nushell integration. # Zoxide — smarter cd with Nushell integration.
{ {
config, config,
lib, lib,
@@ -13,7 +13,6 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
enableFishIntegration = true;
enableNushellIntegration = true; enableNushellIntegration = true;
}; };
}; };
+1 -1
View File
@@ -1,7 +1,7 @@
# profiles/base/default.nix — Always loaded on every host. # profiles/base/default.nix — Always loaded on every host.
# #
# Provides: # Provides:
# - Shell (nushell, fish, starship) with enable options # - Shell (nushell, starship) with enable options
# - CLI tools (bat, carapace, direnv, eza, fzf, lf, nitch, television, zellij, zoxide) # - CLI tools (bat, carapace, direnv, eza, fzf, lf, nitch, television, zellij, zoxide)
# - Secrets management (pass-wayland) # - Secrets management (pass-wayland)
# - Color scheme (dracula) # - Color scheme (dracula)
+1 -1
View File
@@ -1,4 +1,4 @@
# Shell aggregator — imports Nushell (primary), Fish, and Starship prompt. # Shell aggregator — imports Nushell and Starship prompt.
{...}: { {...}: {
imports = [ imports = [
./nushell.nix ./nushell.nix
+10 -112
View File
@@ -1,118 +1,16 @@
# Fish shell configuration exposed under the new base namespace. # Deprecated: Fish was removed in favour of Nushell. The option stays as a no-op
# so configs that still set it keep evaluating; delete once none do.
{ {
config, config,
lib, lib,
... ...
}: }: {
with lib; let options.base.shell.fish.enable = lib.mkOption {
cfg = config.base.shell.fish; type = lib.types.bool;
in { default = false;
# Enabled by default — base modules are always-on. visible = false;
options.base.shell.fish.enable = (mkEnableOption "enable fish shell") // {default = true;}; description = "Deprecated no-op. Fish is no longer configured by m3ta-home.";
config = mkIf cfg.enable {
programs.fish = {
enable = true;
interactiveShellInit = ''
# Fish colors using universal nix-colors palette
# Text colors
set -g fish_color_normal ${config.colorScheme.palette.base05} # text
set -g fish_color_param ${config.colorScheme.palette.base05} # text
set -g fish_color_comment ${config.colorScheme.palette.base03} # muted
set -g fish_color_autosuggestion ${config.colorScheme.palette.base03} # muted
# Command colors
set -g fish_color_command ${config.colorScheme.palette.base0D} # accent6 (blue)
set -g fish_color_quote ${config.colorScheme.palette.base0A} # accent3 (yellow)
set -g fish_color_redirection ${config.colorScheme.palette.base0E} # accent7 (purple)
set -g fish_color_end ${config.colorScheme.palette.base08} # accent1 (red)
set -g fish_color_error ${config.colorScheme.palette.base08} # accent1 (red)
set -g fish_color_operator ${config.colorScheme.palette.base0C} # accent5 (cyan)
set -g fish_color_escape ${config.colorScheme.palette.base09} # accent2 (orange)
# Path colors
set -g fish_color_cwd ${config.colorScheme.palette.base0B} # accent4 (green)
set -g fish_color_cwd_root ${config.colorScheme.palette.base08} # accent1 (red)
set -g fish_color_valid_path --underline
# Interactive colors
set -g fish_color_match ${config.colorScheme.palette.base0B} # accent4 (green)
set -g fish_color_selection --background=${config.colorScheme.palette.base02} # overlay
set -g fish_color_search_match --background=${config.colorScheme.palette.base02} # overlay
set -g fish_color_history_current --bold
set -g fish_color_user ${config.colorScheme.palette.base0B} # accent4 (green)
set -g fish_color_host ${config.colorScheme.palette.base0D} # accent6 (blue)
set -g fish_color_cancel -r
# Pager colors
set -g fish_pager_color_completion normal
set -g fish_pager_color_description ${config.colorScheme.palette.base03} # muted
set -g fish_pager_color_prefix ${config.colorScheme.palette.base0E} # accent7 (purple)
set -g fish_pager_color_progress ${config.colorScheme.palette.base0B} # accent4 (green)
'';
loginShellInit = ''
set -x NIX_PATH nixpkgs=channel:nixos-unstable
set -x NIX_LOG info
set -x WEBKIT_DISABLE_COMPOSITING_MODE 1
set -x TERMINAL ghostty
set -x EDITOR nvim
set -x VISUAL zed
set -x XDG_DATA_HOME $HOME/.local/share
set -x FZF_CTRL_R_OPTS "
--preview='bat --color=always -n {}'
--preview-window up:3:hidden:wrap
--bind 'ctrl-/:toggle-preview'
--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'
--color header:bold
--header 'Press CTRL-Y to copy command into clipboard'"
set -x FZF_DEFAULT_COMMAND fd --type f --exclude .git --follow --hidden
set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
set -x FLAKE $HOME/p/nixos/nixos-config
source /run/agenix/${config.home.username}-secrets
if test (tty) = "/dev/tty1"
exec uwsm start -F /run/current-system/sw/bin/Hyprland
end
if test (tty) = "/dev/tty2"
exec gamescope -O HDMI-A-1 -W 1920 -H 1080 --adaptive-sync --hdr-enabled --rt --steam -- steam -pipewire-dmabuf -tenfoot
end
'';
shellAbbrs = {
".." = "cd ..";
"..." = "cd ../..";
b = "yazi";
ls = "eza";
l = "eza -l --icons --git -a";
lt = "eza --tree --level=2 --long --icons --git";
grep = "rg";
ps = "procs";
just = "just --unstable";
node = "bun";
npx = "bunx";
fs = "du -ah . | sort -hr | head -n 10";
n = "nix";
nd = "nix develop -c $SHELL";
ns = "nix shell";
nsn = "nix shell nixpkgs#";
nb = "nix build";
nbn = "nix build nixpkgs#";
nf = "nix flake";
nr = "sudo nixos-rebuild --flake .";
nrs = "sudo nixos-rebuild switch --flake .#(uname -n)";
snr = "sudo nixos-rebuild --flake .";
snrs = "sudo nixos-rebuild --flake . switch";
hm = "home-manager --flake .";
hms = "home-manager --flake . switch";
hmr = "cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch";
tsu = "sudo tailscale up";
tsd = "sudo tailscale down";
vi = "nvim";
vim = "nvim";
};
};
}; };
config.warnings = lib.optional config.base.shell.fish.enable "base.shell.fish.enable has no effect anymore: Fish was removed from m3ta-home. Drop the setting.";
} }
+10 -4
View File
@@ -6,6 +6,8 @@
}: }:
with lib; let with lib; let
cfg = config.base.shell.nushell; cfg = config.base.shell.nushell;
# User-specific secrets file from agenix, resolved at build time.
secretsFile = "/run/agenix/${config.home.username}-secrets";
in { in {
# Enabled by default — base modules are always-on. # Enabled by default — base modules are always-on.
options.base.shell.nushell.enable = (mkEnableOption "enable nushell") // {default = true;}; options.base.shell.nushell.enable = (mkEnableOption "enable nushell") // {default = true;};
@@ -13,6 +15,9 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.nushell = { programs.nushell = {
enable = true; enable = true;
# Keep the pre-26.11 behaviour; set explicitly to silence the
# home-manager default-change warning.
loadSessionVariables = false;
envFile.text = '' envFile.text = ''
$env.config.show_banner = false $env.config.show_banner = false
$env.NIX_PATH = "nixpkgs=channel:nixos-unstable" $env.NIX_PATH = "nixpkgs=channel:nixos-unstable"
@@ -42,15 +47,16 @@ in {
| load-env | load-env
} }
# Load m3tam3re secrets from agenix. The secret file is Nushell code # Load user-specific secrets from agenix. The secret file is Nushell code
# containing a `load-env { ... }` block, not KEY=VALUE lines. # containing a `load-env { ... }` block, not KEY=VALUE lines.
# `source` resolves literal paths at parse time, so use `null` when absent. # `source` resolves literal paths at parse time, so use `null` when absent.
const m3tam3re_secrets_file = if ("/run/agenix/m3tam3re-secrets" | path exists) { # Path is resolved at Nix build time via config.home.username.
"/run/agenix/m3tam3re-secrets" const user_secrets_file = if ("${secretsFile}" | path exists) {
"${secretsFile}"
} else { } else {
null null
} }
source $m3tam3re_secrets_file source $user_secrets_file
''; '';
configFile.text = '' configFile.text = ''
-1
View File
@@ -13,7 +13,6 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.starship = { programs.starship = {
enable = true; enable = true;
enableFishIntegration = true;
enableNushellIntegration = true; enableNushellIntegration = true;
settings = { settings = {
format = "$all$character"; format = "$all$character";
+3 -1
View File
@@ -11,6 +11,8 @@ in {
options.desktop.apps.office.enable = mkEnableOption "install office and paperwork apps"; options.desktop.apps.office.enable = mkEnableOption "install office and paperwork apps";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [pkgs.libreoffice-fresh]; # libreoffice-fresh warns: upstream changed versioning; -stable is the
# supported attr now.
home.packages = [pkgs.libreoffice-stable];
}; };
} }
+2 -2
View File
@@ -57,6 +57,7 @@
]; ];
pointerCursor = { pointerCursor = {
enable = true;
gtk.enable = true; gtk.enable = true;
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice"; name = "Bibata-Modern-Ice";
@@ -71,7 +72,6 @@
(element-desktop.override { (element-desktop.override {
commandLineArgs = "--password-store=gnome-libsecret"; commandLineArgs = "--password-store=gnome-libsecret";
}) })
m3taHomeInputs.hermes-agent.packages.${pkgs.stdenv.hostPlatform.system}.desktop
launch-webapp launch-webapp
file-roller file-roller
gsettings-desktop-schemas gsettings-desktop-schemas
@@ -86,6 +86,7 @@
vivaldi vivaldi
vivaldi-ffmpeg-codecs vivaldi-ffmpeg-codecs
vibetyper vibetyper
llm-agents.voxtype
]; ];
}; };
@@ -93,7 +94,6 @@
programs.ghostty = { programs.ghostty = {
enable = true; enable = true;
enableFishIntegration = true;
enableBashIntegration = true; enableBashIntegration = true;
settings = { settings = {
font-family = "Fira Code"; font-family = "Fira Code";
+1 -1
View File
@@ -6,7 +6,7 @@
}: { }: {
qt = { qt = {
enable = true; enable = true;
platformTheme.name = "gtk"; platformTheme.name = "gtk3";
}; };
gtk = { gtk = {
+1 -1
View File
@@ -3,7 +3,7 @@
imports = [ imports = [
./hyprland.nix ./hyprland.nix
./wayland.nix ./wayland.nix
./rofi.nix # ./rofi.nix
./dms.nix ./dms.nix
]; ];
} }
+2 -1
View File
@@ -18,8 +18,9 @@ in {
enableDynamicTheming = true; enableDynamicTheming = true;
enableClipboardPaste = true; enableClipboardPaste = true;
# NOTE: dankBatteryAlerts was removed from dms-plugin-registry; battery
# alerts (low/critical/charge-limit) are builtin to DMS since stable.
plugins = { plugins = {
dankBatteryAlerts.enable = true;
emojiLauncher.enable = true; emojiLauncher.enable = true;
dankPomodoroTimer.enable = true; dankPomodoroTimer.enable = true;
dankVault.enable = true; dankVault.enable = true;
+481 -177
View File
@@ -6,215 +6,519 @@
}: }:
with lib; let with lib; let
cfg = config.desktop.wm.hyprland; cfg = config.desktop.wm.hyprland;
lua = lib.generators.mkLuaInline;
luaString = builtins.toJSON;
mkEnvVar = name: value: {
_args = [
name
value
];
};
modKey = key: lua ''mainMod .. " + ${key}"'';
mkDispatcher = expression: lua expression;
execCmd = command: "hl.dsp.exec_cmd(${luaString command})";
execExpr = expression: "hl.dsp.exec_cmd(${expression})";
mkBinding = keys: dispatcher: {
_args = [
keys
(mkDispatcher dispatcher)
];
};
mkBindingWithOptions = keys: dispatcher: options: {
_args = [
keys
(mkDispatcher dispatcher)
options
];
};
startupCommand = command: {
_args = [
"hyprland.start"
(lua ''
function()
hl.exec_cmd(${luaString command})
end
'')
];
};
focusWorkspace = workspace: "hl.dsp.focus({ workspace = ${luaString workspace} })";
moveToWorkspace = workspace: "hl.dsp.window.move({ workspace = ${luaString workspace} })";
in { in {
options.desktop.wm.hyprland.enable = mkEnableOption "Hyprland window manager"; options.desktop.wm.hyprland.enable = mkEnableOption "Hyprland window manager";
config = mkIf cfg.enable { config = mkIf cfg.enable {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
configType = "hyprlang"; configType = "lua";
extraLuaFiles."00-dms" = {
autoLoad = true;
content = ''
-- DMS setup/runtime owns these modules. Load the Lua equivalents of
-- the pre-migration active sources (colors, layout, outputs) plus the
-- user-managed binds-user and windowrules, before local Home Manager
-- settings, preserving the old source-first order without enabling
-- DMS default binds (dms.binds stays unloaded).
--
-- Keep fresh Home Manager generations usable before DMS has written
-- ~/.config/hypr/dms/*.lua: each require is guarded by
-- package.searchpath. Hyprland's safeLuaRequire would swallow a
-- missing module silently, but the guards keep `hyprctl
-- configerrors` clean.
--
-- IMPORTANT: keep every require call as a literal single-line
-- statement. DMS detects inclusion via a static text scan
-- (dms config resolve-include, regex: word-boundary require
-- followed by a quoted module name) and does NOT follow wrapper
-- functions like require_if_present — hiding the calls behind a
-- helper made DMS report all dms modules as not included.
if package.searchpath("dms.colors", package.path) then require("dms.colors") end
if package.searchpath("dms.layout", package.path) then require("dms.layout") end
if package.searchpath("dms.outputs", package.path) then require("dms.outputs") end
if package.searchpath("dms.binds-user", package.path) then require("dms.binds-user") end
if package.searchpath("dms.windowrules", package.path) then require("dms.windowrules") end
'';
};
settings = { settings = {
xwayland = { mainMod = {
force_zero_scaling = true; _var = "SUPER";
}; };
source = [ terminal = {
"~/.config/hypr/dms/colors.conf" _var = "ghostty";
"~/.config/hypr/dms/layout.conf"
"~/.config/hypr/monitors.conf"
];
exec-once = [
"vibetyper"
];
env = [
"XCURSOR_SIZE,32"
"HYPRCURSOR_THEME,Bibata-Modern-Ice"
"WLR_NO_HARDWARE_CURSORS,1"
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"XKB_DEFAULT_LAYOUT,de"
"NIXOS_OZONE_WL,1"
"QT_QPA_PLATFORM,wayland;xcb"
"QT_QPA_PLATFORMTHEME,gtk3"
"QT_QPA_PLATFORMTHEME_QT6,gtk3"
];
input = {
kb_layout = "de,us";
kb_variant = "";
kb_model = "";
kb_rules = "";
kb_options = "ctrl:nocaps";
follow_mouse = 1;
}; };
general = { config = {
gaps_in = 5; xwayland = {
gaps_out = 5; force_zero_scaling = true;
border_size = 1;
layout = "dwindle";
};
decoration = {
shadow = {
enabled = true;
range = 60;
render_power = 3;
# color = "rgba(${config.colorScheme.palette.base00}66)";
offset = "1 2";
scale = 0.97;
}; };
rounding = 8; input = {
blur = { kb_layout = "us,de";
kb_variant = "";
kb_model = "";
kb_rules = "";
kb_options = "ctrl:nocaps";
follow_mouse = 1;
};
general = {
gaps_in = 5;
gaps_out = 5;
border_size = 1;
layout = "dwindle";
};
decoration = {
shadow = {
enabled = true;
range = 60;
render_power = 3;
# color = "rgba(${config.colorScheme.palette.base00}66)";
offset = "1 2";
scale = 0.97;
};
rounding = 8;
blur = {
enabled = true;
size = 3;
passes = 3;
};
active_opacity = 0.9;
inactive_opacity = 0.5;
};
animations = {
enabled = true; enabled = true;
size = 3; };
passes = 3; dwindle = {
# pseudotile = true; # TODO
preserve_split = true;
};
master = {
new_status = "master";
}; };
active_opacity = 0.9;
inactive_opacity = 0.5;
}; };
animations = { on = [
enabled = true; (startupCommand "vibetyper")
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; ];
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
dwindle = { "env" = [
# pseudotile = true; # TODO (mkEnvVar "XCURSOR_SIZE" "32")
preserve_split = true; (mkEnvVar "HYPRCURSOR_THEME" "Bibata-Modern-Ice")
}; (mkEnvVar "WLR_NO_HARDWARE_CURSORS" "1")
(mkEnvVar "XDG_CURRENT_DESKTOP" "Hyprland")
master = { (mkEnvVar "XDG_SESSION_TYPE" "wayland")
new_status = "master"; (mkEnvVar "XDG_SESSION_DESKTOP" "Hyprland")
}; (mkEnvVar "XKB_DEFAULT_LAYOUT" "de")
(mkEnvVar "NIXOS_OZONE_WL" "1")
(mkEnvVar "QT_QPA_PLATFORM" "wayland;xcb")
(mkEnvVar "QT_QPA_PLATFORMTHEME" "gtk3")
(mkEnvVar "QT_QPA_PLATFORMTHEME_QT6" "gtk3")
];
device = [ device = [
{ {
name = "zsa-technology-labs-moonlander-mark-i"; name = "video-bus";
kb_layout = "us"; kb_layout = "de,us";
kb_options = "ctrl:nocaps";
}
{
name = "razer-razer-pro-click-v2-vertical-edition-keyboard";
kb_layout = "de,us";
kb_options = "ctrl:nocaps";
}
{
name = "razer-razer-pro-click-v2-vertical-edition-1";
kb_layout = "de,us";
kb_options = "ctrl:nocaps";
} }
{ {
name = "vibe-typer-virtual-keyboard"; name = "vibe-typer-virtual-keyboard";
kb_layout = "de"; kb_layout = "de";
kb_options = "ctrl:nocaps";
} }
{ {
name = "keychron-keychron-k7"; name = "keychron-keychron-k7";
kb_layout = "us"; kb_layout = "us,de";
kb_options = "ctrl:nocaps";
}
# Moonlander Sub-Devices bleiben us zuerst (de als zweites Layout):
{
name = "zsa-technology-labs-moonlander-mark-i-consumer-control";
kb_layout = "us,de";
kb_options = "ctrl:nocaps";
}
{
name = "zsa-technology-labs-moonlander-mark-i-keyboard";
kb_layout = "us,de";
kb_options = "ctrl:nocaps";
}
{
name = "zsa-technology-labs-moonlander-mark-i-system-control";
kb_layout = "us,de";
kb_options = "ctrl:nocaps";
}
{
name = "asustek-computer-inc.-gz302ea-keyboard";
kb_layout = "de,us";
kb_options = "ctrl:nocaps";
}
{
name = "asustek-computer-inc.-gz302ea-keyboard-2";
kb_layout = "de,us";
kb_options = "ctrl:nocaps";
} }
]; ];
windowrule = [ curve = {
"match:class file_progress, float on" _args = [
"match:class confirm, float on" "myBezier"
"match:class dialog, float on" (lua ''{ type = "bezier", points = { { 0.05, 0.9 }, { 0.1, 1.05 } } }'')
"match:class download, float on" ];
"match:class notification, float on" };
"match:class error, float on"
"match:class splash, float on" animation = [
"match:class confirmreset, float on" {
"match:title Open File, float on" leaf = "windows";
"match:title branchdialog, float on" enabled = true;
"match:class pavucontrol-qt, float on" speed = 7;
"match:class pavucontrol, float on" bezier = "myBezier";
"match:class class:^(espanso)$, float on" }
"match:class wlogout, fullscreen on" {
"match:title wlogout, float on" leaf = "windowsOut";
"match:title wlogout, fullscreen on" enabled = true;
"match:class mpv, float on" speed = 7;
"match:class mpv, idle_inhibit focus" bezier = "default";
"match:class mpv, opacity 1.0 override" style = "popin 80%";
"match:title ^(Media viewer)$, float on" }
"match:title ^(Volume Control)$, float on" {
"match:title ^(Picture-in-Picture)$, float on" leaf = "border";
"match:title ^(floating-pomodoro)$, float on" enabled = true;
"match:title ^(floating-pomodoro)$, size 250 50" speed = 10;
"match:title ^(floating-pomodoro)$, move 12 (monitor_h-150)" bezier = "default";
"match:title ^(floating-pomodoro)$, pin on" }
"match:initial_title .*streamlabs.com.*, float on" {
"match:initial_title .*streamlabs.com.*, pin on" leaf = "borderangle";
"match:initial_title .*streamlabs.com.*, size 800 400" enabled = true;
"match:initial_title .*alert-box.*, move 100%-820 102" speed = 8;
"match:initial_title .*chat-box.*, move 100%-820 512" bezier = "default";
"match:initial_title .*streamlabs.com.*, opacity 0.5 override" }
"match:initial_title .*streamlabs.com.*, idle_inhibit focus" {
"match:initial_title .*streamlabs.com.*, no_anim on" leaf = "fade";
"match:initial_title .*streamlabs.com.*, decorate off" enabled = true;
"match:initial_title .*streamlabs.com.*, no_shadow on" speed = 7;
"match:initial_title .*streamlabs.com.*, no_blur on" bezier = "default";
"match:class ^vibe-typer$, match:title ^Recording Indicator$, no_blur on" }
"border_color rgb(ffffff), match:xwayland 1" {
leaf = "workspaces";
enabled = true;
speed = 6;
bezier = "default";
}
]; ];
"$mainMod" = "SUPER"; window_rule = [
"$terminal" = "ghostty"; {
match.class = "file_progress";
bind = [ float = true;
"$mainMod, return, exec, $terminal nu -c zellij-ps" }
"$mainMod, t, exec, $terminal -e nu -c 'nitch; exec nu'" {
"$mainMod SHIFT, t, exec, launch-timer" match.class = "confirm";
"$mainMod, n, exec, $terminal -e nvim" float = true;
"$mainMod, z, exec, uwsm app -- zeditor" }
"$mainMod, o, exec, hyprctl dispatch setprop activewindow opaque toggle" {
"$mainMod, r, exec, hyprctl dispatch focuswindow \"initialtitle:.*alert-box.*\" && hyprctl dispatch moveactive exact 4300 102 && hyprctl dispatch focuswindow \"initialtitle:.*chat-box.*\" && hyprctl dispatch moveactive exact 4300 512" match.class = "dialog";
"$mainMod, b, exec, uwsm app -- thunar" float = true;
"$mainMod SHIFT, B, exec, uwsm app -- vivaldi" }
"$mainMod, Escape, exec, uwsm app -- dms ipc call powermenu toggle" {
# "$mainMod, Space, togglefloating" match.class = "download";
"$mainMod, q, killactive" float = true;
"$mainMod, M, exit" }
"$mainMod, F, fullscreen" {
"$mainMod SHIFT, V, togglefloating" match.class = "notification";
"$mainMod, D, exec, uwsm app -- dms ipc call spotlight toggle" float = true;
"$mainMod, V, exec, uwsm app -- dms ipc call clipboard toggle" }
"$mainMod, C, exec, bash -c 'FILE=/tmp/screenshot_$(date +%s).png; grim -g \"$(slurp)\" \"$FILE\" && ksnip \"$FILE\"'" {
"$mainMod SHIFT, S, exec, uwsm app -- rofi -show emoji" match.class = "error";
"$mainMod, P, exec, uwsm app -- rofi-pass" float = true;
"$mainMod SHIFT, P, pseudo" }
"$mainMod, R, exec, stt-ptt start" {
"$mainMod, S, exec, stt-ptt start" match.class = "splash";
# "$mainMod, J, togglesplit" # TODO float = true;
"$mainMod, h, movefocus, l" }
"$mainMod, l, movefocus, r" {
"$mainMod, k, movefocus, u" match.class = "confirmreset";
"$mainMod, j, movefocus, d" float = true;
"$mainMod, 1, workspace, 1" }
"$mainMod, 2, workspace, 2" {
"$mainMod, 3, workspace, 3" match.title = "Open File";
"$mainMod, 4, workspace, 4" float = true;
"$mainMod, 5, workspace, 5" }
"$mainMod, 6, workspace, 6" {
"$mainMod, 7, workspace, 7" match.title = "branchdialog";
"$mainMod, 8, workspace, 8" float = true;
"$mainMod, 9, workspace, 9" }
"$mainMod, 0, workspace, 10" {
"$mainMod SHIFT, 1, movetoworkspace, 1" match.class = "pavucontrol-qt";
"$mainMod SHIFT, 2, movetoworkspace, 2" float = true;
"$mainMod SHIFT, 3, movetoworkspace, 3" }
"$mainMod SHIFT, 4, movetoworkspace, 4" {
"$mainMod SHIFT, 5, movetoworkspace, 5" match.class = "pavucontrol";
"$mainMod SHIFT, 6, movetoworkspace, 6" float = true;
"$mainMod SHIFT, 7, movetoworkspace, 7" }
"$mainMod SHIFT, 8, movetoworkspace, 8" {
"$mainMod SHIFT, 9, movetoworkspace, 9" match.class = "class:^(espanso)$";
"$mainMod SHIFT, 0, movetoworkspace, 10" float = true;
"$mainMod, mouse_down, workspace, e+1" }
"$mainMod, mouse_up, workspace, e-1" {
match.class = "wlogout";
fullscreen = true;
}
{
match.title = "wlogout";
float = true;
}
{
match.title = "wlogout";
fullscreen = true;
}
{
match.class = "mpv";
float = true;
}
{
match.class = "mpv";
idle_inhibit = "focus";
}
{
match.class = "mpv";
opacity = "1.0 override";
}
{
match.title = "^(Media viewer)$";
float = true;
}
{
match.title = "^(Volume Control)$";
float = true;
}
{
match.title = "^(Picture-in-Picture)$";
float = true;
}
{
match.title = "^(floating-pomodoro)$";
float = true;
}
{
match.title = "^(floating-pomodoro)$";
size = "250 50";
}
{
match.title = "^(floating-pomodoro)$";
move = "12 (monitor_h-150)";
}
{
match.title = "^(floating-pomodoro)$";
pin = true;
}
{
match.initial_title = ".*streamlabs.com.*";
float = true;
}
{
match.initial_title = ".*streamlabs.com.*";
pin = true;
}
{
match.initial_title = ".*streamlabs.com.*";
size = "800 400";
}
{
match.initial_title = ".*alert-box.*";
move = "100%-820 102";
}
{
match.initial_title = ".*chat-box.*";
move = "100%-820 512";
}
{
match.initial_title = ".*streamlabs.com.*";
opacity = "0.5 override";
}
{
match.initial_title = ".*streamlabs.com.*";
idle_inhibit = "focus";
}
{
match.initial_title = ".*streamlabs.com.*";
no_anim = true;
}
{
match.initial_title = ".*streamlabs.com.*";
decorate = false;
}
{
match.initial_title = ".*streamlabs.com.*";
no_shadow = true;
}
{
match.initial_title = ".*streamlabs.com.*";
no_blur = true;
}
{
match = {
class = "^vibe-typer$";
title = "^Recording Indicator$";
};
# 1.5.x renders a small bottom-center panel, not a fullscreen overlay.
# Without float it gets tiled by dwindle and clipped to tile size.
float = true;
}
{
match = {
class = "^vibe-typer$";
title = "^Recording Indicator$";
};
pin = true;
}
{
match = {
class = "^vibe-typer$";
title = "^Recording Indicator$";
};
no_blur = true;
}
{
match = {
class = "^vibe-typer$";
title = "^Recording Indicator$";
};
no_shadow = true;
}
{
match = {
class = "^vibe-typer$";
title = "^Recording Indicator$";
};
no_anim = true;
}
{
match = {
class = "^vibe-typer$";
title = "^Recording Indicator$";
};
border_size = 0;
}
{
match = {
class = "^vibe-typer$";
title = "^Recording Indicator$";
};
no_focus = true;
}
{
match.xwayland = true;
border_color = "rgb(ffffff)";
}
]; ];
bindr = [ "bind" = [
]; # mainMod + return intentionally remains disabled from the previous config.
(mkBinding (modKey "t") (execExpr ''terminal .. " -e nu -c 'nitch; exec nu'"''))
bindm = [ (mkBinding (modKey "SHIFT + t") (execCmd "launch-timer"))
"$mainMod, mouse:272, movewindow" (mkBinding (modKey "n") (execExpr ''terminal .. " -e nvim"''))
"$mainMod, mouse:273, resizewindow" (mkBinding (modKey "z") (execCmd "uwsm app -- zeditor"))
(mkBinding (modKey "o") ''hl.dsp.window.set_prop({ prop = "opaque", value = "toggle" })'')
(mkBinding (modKey "r") (
execCmd ''hyprctl dispatch focuswindow "initialtitle:.*alert-box.*" && hyprctl dispatch moveactive exact 4300 102 && hyprctl dispatch focuswindow "initialtitle:.*chat-box.*" && hyprctl dispatch moveactive exact 4300 512''
))
(mkBinding (modKey "b") (execCmd "uwsm app -- thunar"))
(mkBinding (modKey "SHIFT + B") (execCmd "uwsm app -- vivaldi"))
(mkBinding (modKey "Escape") (execCmd "uwsm app -- dms ipc call powermenu toggle"))
(mkBinding (modKey "q") "hl.dsp.window.close()")
(mkBinding (modKey "M") "hl.dsp.exit()")
(mkBinding (modKey "F") "hl.dsp.window.fullscreen({})")
(mkBinding (modKey "SHIFT + V") ''hl.dsp.window.float({ action = "toggle" })'')
(mkBinding (modKey "D") (execCmd "uwsm app -- dms ipc call spotlight toggle"))
(mkBinding (modKey "V") (execCmd "uwsm app -- dms ipc call clipboard toggle"))
(mkBinding (modKey "C") (
execCmd "bash -c 'FILE=/tmp/screenshot_$(date +%s).png; grim -g \"$(slurp)\" \"$FILE\" && ksnip \"$FILE\"'"
))
(mkBinding (modKey "SHIFT + S") (execCmd "uwsm app -- rofi -show emoji"))
(mkBinding (modKey "P") (execCmd "uwsm app -- rofi-pass"))
(mkBinding (modKey "SHIFT + P") "hl.dsp.window.pseudo({})")
(mkBinding (modKey "R") (execCmd "stt-ptt start"))
(mkBinding (modKey "S") (execCmd "stt-ptt start"))
(mkBinding (modKey "h") ''hl.dsp.focus({ direction = "l" })'')
(mkBinding (modKey "l") ''hl.dsp.focus({ direction = "r" })'')
(mkBinding (modKey "k") ''hl.dsp.focus({ direction = "u" })'')
(mkBinding (modKey "j") ''hl.dsp.focus({ direction = "d" })'')
(mkBinding (modKey "1") (focusWorkspace "1"))
(mkBinding (modKey "2") (focusWorkspace "2"))
(mkBinding (modKey "3") (focusWorkspace "3"))
(mkBinding (modKey "4") (focusWorkspace "4"))
(mkBinding (modKey "5") (focusWorkspace "5"))
(mkBinding (modKey "6") (focusWorkspace "6"))
(mkBinding (modKey "7") (focusWorkspace "7"))
(mkBinding (modKey "8") (focusWorkspace "8"))
(mkBinding (modKey "9") (focusWorkspace "9"))
(mkBinding (modKey "0") (focusWorkspace "10"))
(mkBinding (modKey "SHIFT + 1") (moveToWorkspace "1"))
(mkBinding (modKey "SHIFT + 2") (moveToWorkspace "2"))
(mkBinding (modKey "SHIFT + 3") (moveToWorkspace "3"))
(mkBinding (modKey "SHIFT + 4") (moveToWorkspace "4"))
(mkBinding (modKey "SHIFT + 5") (moveToWorkspace "5"))
(mkBinding (modKey "SHIFT + 6") (moveToWorkspace "6"))
(mkBinding (modKey "SHIFT + 7") (moveToWorkspace "7"))
(mkBinding (modKey "SHIFT + 8") (moveToWorkspace "8"))
(mkBinding (modKey "SHIFT + 9") (moveToWorkspace "9"))
(mkBinding (modKey "SHIFT + 0") (moveToWorkspace "10"))
(mkBinding (modKey "mouse_down") (focusWorkspace "e+1"))
(mkBinding (modKey "mouse_up") (focusWorkspace "e-1"))
(mkBindingWithOptions (modKey "mouse:272") "hl.dsp.window.drag()" {mouse = true;})
(mkBindingWithOptions (modKey "mouse:273") "hl.dsp.window.resize()" {mouse = true;})
(mkBinding (modKey "SPACE") (execCmd "hyprctl switchxkblayout current next"))
]; ];
}; };
}; };
+1 -1
View File
@@ -201,7 +201,7 @@ in {
}; };
}; };
terminal = pkgs.ghostty; terminal = pkgs.ghostty;
terminalCommand = "opencode %a"; terminalCommand = "opencode2 %a";
}; };
}; };
} }
@@ -1,36 +0,0 @@
{config, ...}: {
programs.agent-lib = {
enable = true;
lockFile = config."m3ta-home".paths.srcRoot + "/agent-sources.lock.json";
targets.pi.enable = true;
targets.opencode.enable = true;
profiles.default = {
sources = {
m3ta-agents = {
agents = {
all = true;
};
skills = {
all = true;
exclude = ["brainstorming" "pdf" "systematic-debugging" "xlsx"];
};
};
anthropic.skills = {
all = true;
exclude = ["skill-creator"];
};
basecamp.skills.all = true;
kestra.skills.all = true;
mattpocock.skills = {
all = true;
};
superpowers.skills = {
all = true;
};
vercel.skills.all = true;
};
};
};
}
+29 -50
View File
@@ -1,7 +1,8 @@
# AI agent system — OpenCode, Pi, and MCP server configuration. # AI agent system — OpenCode, Claude Code, ai-memory and MCP server configuration.
# Relies on coding.agents options provided by home/common/default.nix # Relies on coding.agents options provided by home/common/default.nix
# (m3taHomeInputs.m3ta-nixpkgs.homeManagerModules.default). # (m3taHomeInputs.m3ta-nixpkgs.homeManagerModules.default).
{ {
lib,
m3taHomeInputs, m3taHomeInputs,
pkgs, pkgs,
videoDrivers ? [], videoDrivers ? [],
@@ -13,66 +14,44 @@
enable = true; enable = true;
name = "m3ta-chiron"; name = "m3ta-chiron";
email = "m3ta-chiron@agentmail.to"; email = "m3ta-chiron@agentmail.to";
sshKey = "/home/m3tam3re/.ssh/gitea"; sshKey = lib.mkDefault "/home/m3tam3re/.ssh/gitea";
}; };
imports = [ imports = [
# OpenCode, Pi, and Babysitter agent configurations # ai-memory client, skill mirror, shared MCP catalogue, OpenCode and
./agents-lib.nix # Claude Code config
./babysitter.nix ./ai-memory.nix
./claude-skills.nix
./mcp.nix
./opencode.nix ./opencode.nix
./pi.nix ./claude-code.nix
]; ];
coding.agents.babysitter.enable = true; # NOTE: llm-agent packages are consumed via the `llm-agents` namespace
# (pkgs.llm-agents.*), provided by numtide/llm-agents.nix's
programs.mcp = { # `overlays.shared-nixpkgs`. The consumer's nixos-config MUST apply that
enable = true; # overlay — namespaced refs fail loudly if it is missing, instead of
servers = { # silently falling back to (outdated) nixpkgs attributes.
DeepWiki = {
url = "https://mcp.deepwiki.com/mcp";
};
Ref = {
command = "bash";
args = ["-c" "REF_API_KEY=$(cat /run/agenix/ref-key) exec bunx ref-tools-mcp@latest"];
};
Exa = {
command = "bash";
args = ["-c" "EXA_API_KEY=$(cat /run/agenix/exa-key) exec bunx exa-mcp-server@latest tools=web_search_exa"];
};
Outline = {
url = "https://wiki.az-gruppe.com/mcp";
};
ContextMode = {
command = "bash";
args = ["-c" "exec bunx context-mode@latest"];
};
Honcho = {
command = "bash";
args = [
"-c"
''exec bunx mcp-remote@latest https://mcp.honcho.dev --header "Authorization:Bearer $(cat /run/agenix/honcho-key)" --header "X-Honcho-User-Name:m3tam3re"''
];
};
Playwright = {
command = "bash";
args = ["-c" "exec bunx @playwright/mcp@latest"];
};
};
};
home.packages = with pkgs; [ home.packages = with pkgs; [
agenix-cli agenix-cli
agent-browser agent-lib
m3taHomeInputs.agent-lib.packages.${pkgs.stdenv.hostPlatform.system}.agent-lib-cli llm-agents.agent-browser
beads llm-agents.beads
pi-coding-agent llm-agents.claude-desktop
(qmd.override { crunch
docker-sbx
llm-agents.herdr
(llm-agents.qmd.override {
vulkanSupport = videoDrivers == ["amdgpu"]; vulkanSupport = videoDrivers == ["amdgpu"];
cudaSupport = videoDrivers == ["nvidia"]; cudaSupport = videoDrivers == ["nvidia"];
}) })
# opencode-desktop llm-agents.officecli
llm-agents.opencode2-desktop
openshell openshell
openspec llm-agents.openspec
openwork
talk
llm-agents.t3code
llm-agents.t3code-desktop
]; ];
} }
+156
View File
@@ -0,0 +1,156 @@
# ai-memory client (https://aimemory.sh) — shared agent memory.
#
# The server runs on m3-hermes (nixos-config) and is reached at
# memory.m3ta.dev; no server runs on clients. Hybrid setup:
# - Nix owns the package, the client config (server URL + bearer token
# file), the MCP entries (programs.mcp for OpenCode, and a session-aware
# override in programs.claude-code.mcpServers for Claude Code, both
# delivered through the agents' enableMcpIntegration) and the scope
# markers (~/.ai-memory.toml plus one marker per workspace directory).
# - Activation runs ai-memory's own installers for the lifecycle hooks and
# the skills, so generated files always match the installed ai-memory
# version.
#
# The bearer token (an `aim_` API key, one per host) is an agenix secret the
# host repo provides at `tokenFile`. It is never copied into a generated
# file: the MCP bridge reads `[auth].bearer_token_file` from the client
# config, while the native hooks and the OpenCode plugin read
# `<data_dir>/auth-token`, which activation symlinks to the secret. Without
# the token activation skips the installers instead of writing hooks that
# cannot authenticate.
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.coding.aiMemory;
package = pkgs.llm-agents.ai-memory;
exe = "${package}/bin/ai-memory";
dataDir = "${config.home.homeDirectory}/.local/share/ai-memory";
tomlList = xs: "[${concatMapStringsSep ", " (x: ''"${x}"'') xs}]";
# Markers are not merged with their ancestors, so every marker repeats
# the capture exclusions.
marker = workspace: ''
workspace = "${workspace}"
[capture]
ignore_paths = ${tomlList cfg.ignorePaths}
'';
in {
options.coding.aiMemory = {
enable = mkEnableOption "the ai-memory client (hooks, MCP and skills for coding agents)";
serverUrl = mkOption {
type = types.str;
default = "https://memory.m3ta.dev";
description = "Base URL of the ai-memory server; MCP is served at <serverUrl>/mcp.";
};
tokenFile = mkOption {
type = types.str;
default = "/run/agenix/ai-memory-token";
description = "File holding this host's `aim_` API key, readable by the user.";
};
agents = mkOption {
type = types.listOf (types.enum ["claude-code" "opencode2"]);
default = ["claude-code" "opencode2"];
description = "Agents whose lifecycle hooks are installed.";
};
workspace = mkOption {
type = types.str;
default = "private";
description = ''
ai-memory workspace for every directory below $HOME that has no
marker of its own (and no entry in `workspaceDirs`). Projects are
still derived per repository (git remote), only the workspace is
fixed here. Work hosts set this to the work workspace.
'';
};
workspaceDirs = mkOption {
type = types.attrsOf types.str;
default = {};
example = {"p/AZ" = "az";};
description = ''
Home-relative directories whose subtree belongs to another
workspace. Each gets its own `.ai-memory.toml` marker.
'';
};
ignorePaths = mkOption {
type = types.listOf types.str;
default = ["/run/agenix/**" "~/.config/sops/**" "~/.ssh/**" "**/.env*"];
description = "Paths kept out of capture via the markers' [capture] ignore_paths.";
};
};
config = mkIf cfg.enable {
# The llm-agents build wraps the binary with git on PATH (hooks need it).
home.packages = [package];
home.sessionVariables.AI_MEMORY_SERVER_URL = cfg.serverUrl;
# OpenCode2 picks this up via programs.opencode.enableMcpIntegration.
programs.mcp.servers.ai-memory = {
command = exe;
args = ["mcp-bridge" "--no-session-id" "--server-url" "${cfg.serverUrl}/mcp"];
};
# Claude Code gets the same server name through
# programs.claude-code.enableMcpIntegration, but session-aware: the stdio
# bridge forwards the lifecycle-hook session id and reads the token file
# itself. (A plain HTTP entry carries no credentials, and Claude Code then
# tries OAuth client registration, which ai-memory does not offer.)
# Claude Code's own mcpServers take precedence over the shared entry, so
# this is one server, not two.
programs.claude-code.mcpServers.ai-memory = mkIf (elem "claude-code" cfg.agents) {
command = exe;
args = ["mcp-bridge" "--server-url" "${cfg.serverUrl}/mcp"];
};
home.file =
{
# Client config: `ai-memory hook`, `mcp-bridge` and the installers
# read server_url and the token from here, so no generated file
# carries the token.
".local/share/ai-memory/config.toml".text = ''
server_url = "${cfg.serverUrl}"
[auth]
bearer_token_file = "${cfg.tokenFile}"
'';
# Scope marker: $HOME governs everything without a closer marker.
".ai-memory.toml".text = marker cfg.workspace;
}
# One marker per directory that belongs to another workspace.
// mapAttrs' (dir: ws: nameValuePair "${dir}/.ai-memory.toml" {text = marker ws;}) cfg.workspaceDirs;
home.activation.aiMemoryInstall = lib.hm.dag.entryAfter ["writeBoundary" "claudeSkillsSync"] ''
if [ ! -r ${escapeShellArg cfg.tokenFile} ]; then
echo "ai-memory: token file ${cfg.tokenFile} missing, skipping" >&2
else
# Hooks and the OpenCode plugin read <data_dir>/auth-token; point it at the secret.
run mkdir -p ${escapeShellArg dataDir}
run ln -sfn ${escapeShellArg cfg.tokenFile} ${escapeShellArg "${dataDir}/auth-token"}
${concatMapStringsSep "\n" (agent: ''
run ${exe} install-hooks --agent ${agent} --apply --server-url ${escapeShellArg cfg.serverUrl}
'')
cfg.agents}
${optionalString (elem "claude-code" cfg.agents) ''
# The MCP entry now comes from programs.claude-code (see above);
# drop the user-scope entry earlier versions wrote into ~/.claude.json.
export PATH="${pkgs.llm-agents.claude-code}/bin:$PATH"
run claude mcp remove ai-memory -s user >/dev/null 2>&1 || true
''}
# Into ~/.agents/skills; claude-skills-sync mirrors them to Claude.
run ${exe} install-skills --scope global --agent agents
fi
'';
};
}
+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env bash
# Eval checks for coding.aiMemory against m3-kratos in nixos-config, using
# this checkout of m3ta-home. Usage: ai-memory.test.sh [path/to/nixos-config]
set -euo pipefail
home_repo="$(cd "$(dirname "$0")/../../../.." && pwd)"
nixos_repo="${1:-$home_repo/../nixos-config}"
hm="#nixosConfigurations.m3-kratos.config.home-manager.users.m3tam3re"
fail=0
ev() { # attr [extra nix eval args...]
local attr="$1"; shift
nix eval --raw --override-input m3ta-home "path:$home_repo" "$nixos_repo$hm.$attr" "$@" 2>/dev/null
}
check() { # name, haystack, needle
if [[ "$2" == *"$3"* ]]; then echo "ok $1"; else echo "FAIL $1: missing '$3'"; fail=1; fi
}
refute() { # name, haystack, needle
if [[ "$2" == *"$3"* ]]; then echo "FAIL $1: found '$3'"; fail=1; else echo "ok $1"; fi
}
check "server url" "$(ev home.sessionVariables.AI_MEMORY_SERVER_URL)" "https://memory.m3ta.dev"
conf="$(ev 'home.file.".local/share/ai-memory/config.toml".text')"
check "client config server_url" "$conf" 'server_url = "https://memory.m3ta.dev"'
check "client config token file" "$conf" 'bearer_token_file = "/run/agenix/ai-memory-token"'
mcp="$(ev programs.mcp.servers.ai-memory.args --apply 'builtins.concatStringsSep " "')"
check "mcp bridge" "$mcp" "mcp-bridge --no-session-id --server-url https://memory.m3ta.dev/mcp"
refute "mcp carries no token" "$mcp" "ai-memory-token"
opencode="$(cat "$(nix build --no-link --print-out-paths --override-input m3ta-home "path:$home_repo" \
"$nixos_repo$hm.xdg.configFile.\"opencode/opencode.json\".source" 2>/dev/null)")"
check "opencode gets mcp" "$opencode" "mcp-bridge"
marker="$(ev 'home.file.".ai-memory.toml".text')"
check "home marker workspace" "$marker" 'workspace = "private"'
check "marker section" "$marker" "[capture]"
for p in "/run/agenix/**" "~/.config/sops/**" "~/.ssh/**" "**/.env*"; do
check "marker $p" "$marker" "\"$p\""
done
az="$(ev 'home.file."p/AZ/.ai-memory.toml".text' 2>/dev/null || true)"
check "AZ marker workspace" "$az" 'workspace = "az"'
check "AZ marker repeats capture" "$az" "[capture]"
act="$(ev home.activation.aiMemoryInstall.data)"
check "hooks claude-code" "$act" "install-hooks --agent claude-code --apply"
check "hooks opencode2" "$act" "install-hooks --agent opencode2 --apply"
check "auth-token symlink" "$act" "ln -sfn /run/agenix/ai-memory-token "
refute "no token on command lines" "$act" "--auth-token"
refute "activation must not write opencode.json (home-manager symlink)" "$act" "install-mcp --client opencode"
refute "activation no longer registers the claude mcp itself" "$act" "install-mcp --client claude-code"
check "stale user-scope claude entry is removed" "$act" "claude mcp remove ai-memory -s user"
claude="$(ev programs.claude-code.mcpServers.ai-memory.args --apply 'builtins.concatStringsSep " "')"
check "claude mcp is the session-aware bridge" "$claude" "mcp-bridge --server-url https://memory.m3ta.dev/mcp"
refute "claude mcp forwards the session id" "$claude" "--no-session-id"
# Missing token file: skip with a warning, exit 0, never call ai-memory.
script="$(printf '%s\n' "$act" | sed 's|/run/agenix/ai-memory-token|/nonexistent/ai-memory-token|g')"
out="$(run() { echo "CALLED $*"; }; eval "$script" 2>&1)"
check "skip warning" "$out" "token file /nonexistent/ai-memory-token missing, skipping"
refute "no installer without token" "$out" "CALLED"
exit "$fail"
-142
View File
@@ -1,142 +0,0 @@
# Babysitter user profile for Pi/agent workflows.
{
config,
lib,
...
}: let
cfg = config.coding.agents.babysitter;
defaultTimestamp = "2026-05-29T00:00:00.000Z";
defaultUserProfile = {
name = config.home.username;
specialties = [
{
domain = "declarative-system-configuration";
subdomains = ["nix" "home-manager" "agents"];
}
];
expertiseLevels = {};
goals = [
{
id = "goal-agents-declarative-profile";
description = "Keep Babysitter user preferences declarative and reproducible across systems.";
category = "agents";
priority = "medium";
status = "active";
}
];
preferences = {
verbosity = "concise";
autonomyLevel = "semi-autonomous";
riskTolerance = "conservative";
};
toolPreferences = {
packageManagers = ["nix"];
languages = ["nix"];
operatingSystem = "nixos";
};
breakpointTolerance = {
global = "moderate";
skipBreakpointsForKnownPatterns = false;
alwaysBreakOn = ["destructive-operations" "secrets" "external-publication"];
};
communicationStyle = {
tone = "technical";
language = "en";
useEmojis = false;
explanationDepth = "brief";
preferredResponseFormat = "markdown";
};
experience = {};
installedPlugins = ["babysitter-pi"];
installedSkills = ["babysit" "call" "plan" "resume" "doctor" "yolo"];
installedAgents = [];
createdAt = defaultTimestamp;
updatedAt = defaultTimestamp;
version = 1;
};
effectiveProfile = lib.recursiveUpdate cfg.profile cfg.profileOverrides;
profileJsonTarget = "${cfg.profileDirectory}/user-profile.json";
profileMarkdownTarget = "${cfg.profileDirectory}/user-profile.md";
profilePreferences = effectiveProfile.preferences or {};
profileBreakpointTolerance = effectiveProfile.breakpointTolerance or {};
listMarkdown = values:
lib.concatMapStringsSep "\n" (value: "- ${toString value}") values;
specialtyDomains = map (specialty: specialty.domain or "unspecified") (effectiveProfile.specialties or []);
profileMarkdown = ''
# Babysitter User Profile
This file is generated by Home Manager from `coding.agents.babysitter`.
- Name: ${effectiveProfile.name or "unspecified"}
- Breakpoint tolerance: ${profileBreakpointTolerance.global or "unspecified"}
- Autonomy level: ${profilePreferences.autonomyLevel or "unspecified"}
- Risk tolerance: ${profilePreferences.riskTolerance or "unspecified"}
## Specialties
${listMarkdown specialtyDomains}
## Installed Babysitter Pi Skills
${listMarkdown (effectiveProfile.installedSkills or [])}
'';
in {
options.coding.agents.babysitter = {
enable = lib.mkEnableOption "Babysitter user profile for Pi/agent workflows";
profileDirectory = lib.mkOption {
type = lib.types.str;
default = ".a5c";
description = ''
Home-relative directory where Babysitter reads the user profile.
Babysitter Pi documents the user profile at ~/.a5c/user-profile.json.
'';
};
profile = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = defaultUserProfile;
description = "Complete non-secret Babysitter user profile JSON.";
};
profileOverrides = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = {};
description = ''
Recursive overrides merged into the default Babysitter user profile.
Keep this non-secret; the result is written into the Nix store.
'';
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = cfg.profileDirectory != "" && !lib.hasPrefix "/" cfg.profileDirectory;
message = "coding.agents.babysitter.profileDirectory must be a non-empty home-relative path.";
}
{
assertion = effectiveProfile ? name && builtins.isString effectiveProfile.name;
message = "coding.agents.babysitter profile must include a string name.";
}
{
assertion = effectiveProfile ? specialties && builtins.isList effectiveProfile.specialties;
message = "coding.agents.babysitter profile must include a specialties list.";
}
{
assertion = effectiveProfile ? breakpointTolerance && effectiveProfile.breakpointTolerance ? global;
message = "coding.agents.babysitter profile must include breakpointTolerance.global.";
}
];
home.file = {
"${profileJsonTarget}".text = builtins.toJSON effectiveProfile + "\n";
"${profileMarkdownTarget}".text = profileMarkdown;
};
};
}
@@ -0,0 +1,20 @@
# Claude Code via home-manager `programs.claude-code`.
#
# enableMcpIntegration hands the shared programs.mcp catalogue (mcp.nix) to
# Claude Code the same way opencode.nix does for OpenCode: home-manager
# generates a plugin carrying .mcp.json and registers it (as a personal plugin
# under ~/.claude/skills/claude-code-home-manager on home-manager master, via a
# `--plugin-dir` wrapper on release-26.05). Nothing in ~/.claude is turned
# into a store symlink: settings.json (ai-memory hooks, plugins, theme) and
# ~/.claude.json (logins) stay writable for Claude Code itself.
#
# Do NOT add llm-agents.claude-code to home.packages next to this module;
# programs.claude-code installs its (possibly wrapped) package and a second
# `claude` would collide in the profile.
{pkgs, ...}: {
programs.claude-code = {
enable = true;
package = pkgs.llm-agents.claude-code;
enableMcpIntegration = true;
};
}
@@ -0,0 +1,65 @@
# Mirror agent-lib skills (~/.agents/skills) into Claude Code (~/.claude/skills).
# Each skill gets its own symlink, so Claude's own entries (e.g. `synced/`,
# hand-made skills) stay untouched. Runs on every activation and whenever
# the source directory changes (e.g. after `agent-lib sync`).
{
config,
lib,
pkgs,
...
}: let
src = "${config.home.homeDirectory}/.agents/skills";
dst = "${config.home.homeDirectory}/.claude/skills";
syncSkills = pkgs.writeShellApplication {
name = "claude-skills-sync";
runtimeInputs = [pkgs.coreutils];
text = ''
src=${lib.escapeShellArg src}
dst=${lib.escapeShellArg dst}
mkdir -p "$src" "$dst"
# Drop links into $src whose target is gone.
for link in "$dst"/*; do
[ -L "$link" ] || continue
case "$(readlink "$link")" in
"$src"/*) [ -e "$link" ] || rm -f "$link" ;;
esac
done
# Link every skill folder; never replace a real dir or foreign link.
for skill in "$src"/*/; do
skill="''${skill%/}"
[ -f "$skill/SKILL.md" ] || continue
name="$(basename "$skill")"
target="$dst/$name"
if [ -L "$target" ] || [ ! -e "$target" ]; then
ln -sfn "$skill" "$target"
fi
done
'';
};
in {
home.packages = [syncSkills];
home.activation.claudeSkillsSync = lib.hm.dag.entryAfter ["writeBoundary"] ''
run ${lib.getExe syncSkills}
'';
systemd.user.paths.claude-skills-sync = {
Unit.Description = "Watch ~/.agents/skills for changes";
Path = {
PathChanged = src;
MakeDirectory = true;
};
Install.WantedBy = ["paths.target"];
};
systemd.user.services.claude-skills-sync = {
Unit.Description = "Link ~/.agents/skills into ~/.claude/skills";
Service = {
Type = "oneshot";
ExecStart = lib.getExe syncSkills;
};
};
}
+46
View File
@@ -0,0 +1,46 @@
# Shared MCP server catalogue (home-manager `programs.mcp`).
#
# Single source for every agent that integrates with programs.mcp:
# OpenCode (opencode.nix, enableMcpIntegration) and Claude Code
# (claude-code.nix, enableMcpIntegration). ai-memory adds its own entry in
# ai-memory.nix. Hosts that do not load the whole coding set (servers running
# T3 Code) import this file directly.
{...}: {
programs.mcp = {
enable = true;
servers = {
ContextMode = {
command = "bash";
args = ["-c" "exec bunx context-mode@latest"];
};
DeepWiki = {
url = "https://mcp.deepwiki.com/mcp";
};
Exa = {
command = "bash";
args = ["-c" "EXA_API_KEY=$(cat /run/agenix/exa-key) exec bunx exa-mcp-server@latest tools=web_search_exa"];
};
SallyAI = {
url = "https://app.sally.io/api/v1/McpExternal";
};
Metabase = {
url = "https://kpi.az-gruppe.com/api/metabase-mcp";
};
Outline = {
url = "https://wiki.az-gruppe.com/mcp";
};
Playwright = {
command = "bash";
args = ["-c" "exec bunx @playwright/mcp@latest"];
};
Ref = {
command = "bash";
args = ["-c" "REF_API_KEY=$(cat /run/agenix/ref-key) exec bunx ref-tools-mcp@latest"];
};
Teams = {
command = "bunx";
args = ["-y" "@floriscornel/teams-mcp@latest"];
};
};
};
}
+250 -226
View File
@@ -1,243 +1,267 @@
{lib, ...}: { # OpenCode 2 (TUI) configuration.
coding.opencode = { #
# v2 (pkgs.llm-agents.opencode2) reads ~/.config/opencode/opencode.json and
# normalizes the v1 config format internally: provider/permission/formatter
# keys written below are migrated on load, so the v1-style schema stays valid.
#
# TUI preferences live in cli.json, which v2 owns at runtime:
# - do NOT manage cli.json here (home-manager symlinks would break v2's
# runtime writes), and
# - do NOT set programs.opencode.tui (tui.json is a legacy source that v2
# re-imports into cli.json on every start, clobbering runtime prefs).
#
# The m3ta-nixpkgs `coding.opencode` wrapper is intentionally NOT used: it is
# v1-only (hardcodes the oh-my-openagent plugin and oh-my-openagent.json).
{pkgs, ...}: {
programs.opencode = {
enable = true; enable = true;
enableMcpIntegration = true;
package = pkgs.llm-agents.opencode2;
ohMyOpencodeSettings = { settings = {
agents = { formatter = {
sisyphus.model = "litellm/claude-opus-4-6"; alejandra = {
oracle.model = "litellm/claude-sonnet-4-6"; command = ["alejandra" "-q" "-"];
librarian.model = "litellm/claude-sonnet-4-6"; extensions = [".nix"];
explore.model = "litellm/claude-haiku-4-5"; };
multimodal-looker.model = "litellm/gpt-5.3-codex";
prometheus.model = "litellm/claude-opus-4-6";
metis.model = "litellm/claude-opus-4-6";
momus.model = "litellm/claude-opus-4-6";
atlas.model = "litellm/claude-sonnet-4-6";
};
categories = {
visual-engineering.model = "zai-coding-plan/glm-5.1";
ultrabrain.model = "litellm/claude-opus-4-6";
deep.model = "litellm/claude-sonnet-4-6";
artistry.model = "zai-coding-plan/glm-5.1";
quick.model = "litellm/claude-haiku-4-5";
unspecified-low.model = "litellm/claude-sonnet-4-6";
unspecified-high.model = "litellm/claude-opus-4-6";
writing.model = "zai-coding-plan/glm-5.1";
};
};
};
# Keep TUI settings in programs.opencode.tui to satisfy OpenCode v1.2.15+.
programs.opencode.tui.theme = "opencode";
# Override legacy default settings to avoid deprecated TUI keys in settings.
programs.opencode.settings = lib.mkForce {
plugin = ["oh-my-openagent"];
formatter = {
alejandra = {
command = ["alejandra" "-q" "-"];
extensions = [".nix"];
};
};
# Security: permission hardening for OpenCode
# Last matching rule wins. Glob patterns: * = any chars, ? = single char.
# ~ and $HOME are expanded to the user's home directory.
# external_directory gates paths outside the working directory.
permission = {
# External directory access: ask by default, allow safe paths
"external_directory" = {
"*" = "ask";
"/nix/store/**" = "allow";
"/tmp/**" = "allow";
}; };
# Read access: allow by default, deny sensitive paths # Security: permission hardening for OpenCode
"read" = { # Last matching rule wins. Glob patterns: * = any chars, ? = single char.
"*" = "allow"; # ~ and $HOME are expanded to the user's home directory.
"~/.ssh/**" = "deny"; # external_directory gates paths outside the working directory.
"~/.gnupg/**" = "deny"; permission = {
"~/.aws/**" = "deny"; # External directory access: ask by default, allow safe paths
"~/.kube/**" = "deny"; "external_directory" = {
"~/.config/gh/**" = "deny"; "*" = "ask";
"~/.config/gcloud/**" = "deny"; "/nix/store/**" = "allow";
"~/.config/op/**" = "deny"; "/tmp/**" = "allow";
"~/.config/sops/**" = "deny"; };
"/run/agenix/**" = "deny";
"~/.pi/agent/auth.json" = "deny"; # Read access: allow by default, deny sensitive paths
"~/.pi/agent/sessions/**" = "deny"; "read" = {
"*.env" = "deny"; "*" = "allow";
"*.env.*" = "deny"; "~/.ssh/**" = "deny";
"*.pem" = "deny"; "~/.gnupg/**" = "deny";
"*.key" = "deny"; "~/.aws/**" = "deny";
"*.p12" = "deny"; "~/.kube/**" = "deny";
"*.pfx" = "deny"; "~/.config/gh/**" = "deny";
"*id_rsa*" = "deny"; "~/.config/gcloud/**" = "deny";
"*id_ed25519*" = "deny"; "~/.config/op/**" = "deny";
"*id_ecdsa*" = "deny"; "~/.config/sops/**" = "deny";
"*.example.env" = "allow"; "/run/agenix/**" = "deny";
"*.sample.env" = "allow"; "~/.pi/agent/auth.json" = "deny";
"*.test.env" = "allow"; "~/.pi/agent/sessions/**" = "deny";
".env.example" = "allow"; "*.env" = "deny";
".env.sample" = "allow"; "*.env.*" = "deny";
".env.test" = "allow"; "*.pem" = "deny";
"~/.ssh/*.pub" = "allow"; "*.key" = "deny";
"*.pub" = "allow"; "*.p12" = "deny";
"*.csr" = "allow"; "*.pfx" = "deny";
"*id_rsa*" = "deny";
"*id_ed25519*" = "deny";
"*id_ecdsa*" = "deny";
"*.example.env" = "allow";
"*.sample.env" = "allow";
"*.test.env" = "allow";
".env.example" = "allow";
".env.sample" = "allow";
".env.test" = "allow";
"~/.ssh/*.pub" = "allow";
"*.pub" = "allow";
"*.csr" = "allow";
};
# Edit access: ask by default, deny sensitive paths
"edit" = {
"*" = "ask";
"~/.ssh/**" = "deny";
"~/.gnupg/**" = "deny";
"~/.aws/**" = "deny";
"~/.kube/**" = "deny";
"~/.config/gh/**" = "deny";
"~/.config/gcloud/**" = "deny";
"~/.config/op/**" = "deny";
"~/.config/sops/**" = "deny";
"/run/agenix/**" = "deny";
"~/.pi/agent/auth.json" = "deny";
"~/.pi/agent/sessions/**" = "deny";
"*.env" = "deny";
"*.env.*" = "deny";
"*.pem" = "deny";
"*.key" = "deny";
"*.p12" = "deny";
"*.pfx" = "deny";
"*id_rsa*" = "deny";
"*id_ed25519*" = "deny";
"*id_ecdsa*" = "deny";
"~/.ssh/*.pub" = "allow";
"*.pub" = "allow";
"*.csr" = "allow";
};
# Glob patterns: same rules as read for file matching
"glob" = {
"*" = "allow";
"~/.ssh/**" = "deny";
"~/.gnupg/**" = "deny";
"/run/agenix/**" = "deny";
"*.env" = "deny";
"*.env.*" = "deny";
"*.pem" = "deny";
"*.key" = "deny";
"*.p12" = "deny";
"*.pfx" = "deny";
};
# Grep: allow search, but deny searching for secrets
"grep" = {
"*" = "allow";
"~/.ssh/**" = "deny";
"~/.gnupg/**" = "deny";
"/run/agenix/**" = "deny";
"*PASSWORD*" = "ask";
"*SECRET*" = "ask";
"*API_KEY*" = "ask";
"*PRIVATE_KEY*" = "ask";
};
# Bash: ask by default, deny dangerous and env-leak commands
"bash" = {
"*" = "ask";
"git status*" = "allow";
"git diff*" = "allow";
"git log*" = "allow";
"git branch*" = "allow";
"git show*" = "allow";
"git remote*" = "allow";
"nix --version" = "allow";
"nix eval*" = "allow";
"nix build*" = "allow";
"nix develop*" = "allow";
"nix shell*" = "allow";
"nix search*" = "allow";
"alejandra*" = "allow";
"git add*" = "allow";
"git commit*" = "allow";
"git push*" = "ask";
"git pull*" = "allow";
"rm *" = "ask";
"rm -rf *" = "deny";
"sudo *" = "ask";
"env" = "deny";
"printenv" = "deny";
"cat /proc/*/environ" = "deny";
"gpg *--export-secret*" = "deny";
"ssh-add -D" = "deny";
"docker run --privileged*" = "deny";
"curl *| *sh" = "deny";
"wget *| *sh" = "deny";
};
# Web fetch: allow by default
"webfetch" = "allow";
# Doom loop guard
"doom_loop" = "ask";
}; };
# Edit access: ask by default, deny sensitive paths # AZ-Gruppe LiteLLM endpoint + available models
"edit" = { provider = {
"*" = "ask"; # Z.AI GLM Coding Plan (flat-rate subscription).
"~/.ssh/**" = "deny"; # OpenAI-compatible endpoint; API key from the z.ai console is
"~/.gnupg/**" = "deny"; # injected via {env:...} so it never lands in the store. Consumed by
"~/.aws/**" = "deny"; # interactive opencode2 sessions (shell env) and by agents spawned
"~/.kube/**" = "deny"; # through Paperclip's opencode harness (service EnvironmentFile).
"~/.config/gh/**" = "deny"; zai-coding-plan = {
"~/.config/gcloud/**" = "deny"; npm = "@ai-sdk/openai-compatible";
"~/.config/op/**" = "deny"; name = "Z.AI Coding Plan";
"~/.config/sops/**" = "deny"; options = {
"/run/agenix/**" = "deny"; baseURL = "https://api.z.ai/api/coding/paas/v4";
"~/.pi/agent/auth.json" = "deny"; apiKey = "{env:ZAI_API_KEY}";
"~/.pi/agent/sessions/**" = "deny";
"*.env" = "deny";
"*.env.*" = "deny";
"*.pem" = "deny";
"*.key" = "deny";
"*.p12" = "deny";
"*.pfx" = "deny";
"*id_rsa*" = "deny";
"*id_ed25519*" = "deny";
"*id_ecdsa*" = "deny";
"~/.ssh/*.pub" = "allow";
"*.pub" = "allow";
"*.csr" = "allow";
};
# Glob patterns: same rules as read for file matching
"glob" = {
"*" = "allow";
"~/.ssh/**" = "deny";
"~/.gnupg/**" = "deny";
"/run/agenix/**" = "deny";
"*.env" = "deny";
"*.env.*" = "deny";
"*.pem" = "deny";
"*.key" = "deny";
"*.p12" = "deny";
"*.pfx" = "deny";
};
# Grep: allow search, but deny searching for secrets
"grep" = {
"*" = "allow";
"~/.ssh/**" = "deny";
"~/.gnupg/**" = "deny";
"/run/agenix/**" = "deny";
"*PASSWORD*" = "ask";
"*SECRET*" = "ask";
"*API_KEY*" = "ask";
"*PRIVATE_KEY*" = "ask";
};
# Bash: ask by default, deny dangerous and env-leak commands
"bash" = {
"*" = "ask";
"git status*" = "allow";
"git diff*" = "allow";
"git log*" = "allow";
"git branch*" = "allow";
"git show*" = "allow";
"git remote*" = "allow";
"nix --version" = "allow";
"nix eval*" = "allow";
"nix build*" = "allow";
"nix develop*" = "allow";
"nix shell*" = "allow";
"nix search*" = "allow";
"alejandra*" = "allow";
"git add*" = "allow";
"git commit*" = "allow";
"git push*" = "ask";
"git pull*" = "allow";
"rm *" = "ask";
"rm -rf *" = "deny";
"sudo *" = "ask";
"env" = "deny";
"printenv" = "deny";
"cat /proc/*/environ" = "deny";
"gpg *--export-secret*" = "deny";
"ssh-add -D" = "deny";
"docker run --privileged*" = "deny";
"curl *| *sh" = "deny";
"wget *| *sh" = "deny";
};
# Web fetch: allow by default
"webfetch" = "allow";
# Doom loop guard
"doom_loop" = "ask";
};
# AZ-Gruppe LiteLLM endpoint + available models
provider = {
litellm = {
npm = "@ai-sdk/openai-compatible";
name = "LiteLLM (AZ-Gruppe)";
options.baseURL = "https://llm.az-gruppe.com/v1";
models = {
"gpt-5.2" = {
name = "GPT-5.2";
limit = {
context = 400000;
output = 128000;
};
}; };
"gpt-5.3-codex" = { models = {
name = "GPT-5.3 Codex"; # Primary worker: 1M ctx flat-rate model.
limit = { "glm-5.3" = {
context = 400000; name = "GLM-5.3";
output = 128000; limit = {
}; context = 1000000;
}; output = 128000;
"claude-haiku-4-5" = {
name = "Claude Haiku 4.5";
options = {
thinking = {
type = "enabled";
budget_tokens = 16000;
}; };
}; };
limit = { # High-volume parallel scans: speed-tuned GLM on flat rate.
context = 200000; "glm-5-turbo" = {
output = 64000; name = "GLM-5 Turbo";
}; limit = {
}; context = 200000;
"claude-sonnet-4-6" = { output = 128000;
name = "Claude Sonnet 4.6";
options = {
thinking = {
type = "enabled";
budget_tokens = 16000;
}; };
}; };
limit = {
context = 200000;
output = 64000;
};
}; };
"claude-opus-4-6" = { };
name = "Claude Opus 4.6";
options = { litellm = {
thinking = { npm = "@ai-sdk/openai-compatible";
type = "enabled"; name = "LiteLLM (AZ-Gruppe)";
budget_tokens = 16000; options.baseURL = "https://llm.az-gruppe.com/v1";
models = {
"gpt-5.2" = {
name = "GPT-5.2";
limit = {
context = 400000;
output = 128000;
}; };
}; };
limit = { "gpt-5.6-sol" = {
context = 200000; name = "GPT-5.6 Sol";
output = 128000; limit = {
context = 400000;
output = 128000;
};
};
"gpt-5.3-codex" = {
name = "GPT-5.3 Codex";
limit = {
context = 400000;
output = 128000;
};
};
"claude-haiku-4-5" = {
name = "Claude Haiku 4.5";
options = {
thinking = {
type = "enabled";
budget_tokens = 16000;
};
};
limit = {
context = 200000;
output = 64000;
};
};
"claude-sonnet-5" = {
name = "Claude Sonnet 5";
options = {
thinking = {
type = "adaptive";
};
};
limit = {
context = 200000;
output = 64000;
};
};
"claude-opus-4-8" = {
name = "Claude Opus 4.8";
options = {
thinking = {
type = "adaptive";
};
};
limit = {
context = 200000;
output = 128000;
};
}; };
}; };
}; };
-241
View File
@@ -1,241 +0,0 @@
{...}: {
coding.agents.pi = {
enable = true;
settings = {
packages = [
"npm:@dreadedzombie/pi-init"
"git:github.com/a5c-ai/babysitter-pi"
"npm:@plannotator/pi-extension"
"npm:@thesethrose/pi-zai-provider"
"npm:pi-agent-browser-native"
"npm:pi-beads-extension"
"npm:pi-lens"
"npm:pi-markdown-preview"
"npm:pi-mcp-adapter"
"npm:pi-powerline-footer"
"npm:pi-prompt-template-model"
"npm:pi-subagents"
"npm:pi-tool-display"
"npm:pi-web-access"
"git:github.com/hk-vk/pi-connect"
];
defaultProvider = "openai-codex";
defaultModel = "gpt-5.5";
defaultThinkingLevel = "high";
};
# pi-guardrails: strict security config
# NOTE: Path access checks are lexical (not symlink-safe).
# NOTE: Local project .pi/extensions/guardrails.json can override same rule IDs.
# For immutable global policies, consider a wrapper or upstream patch.
guardrails = {
enable = false;
config = {
enabled = true;
applyBuiltinDefaults = true;
onboarding = {
completed = true;
};
features = {
policies = true;
permissionGate = true;
pathAccess = true;
};
pathAccess = {
mode = "ask";
allowedPaths = [
"/nix/store/"
"/tmp/"
];
};
policies = {
rules = [
# ── SSH keys ───────────────────────────────────────────
{
id = "home-ssh";
enabled = true;
protection = "noAccess";
onlyIfExists = false;
patterns = [
{pattern = "~/.ssh/**";}
{pattern = "~/.ssh/*_rsa";}
{pattern = "~/.ssh/*_ed25519";}
{pattern = "~/.ssh/*.pem";}
];
allowedPatterns = [
{pattern = "~/.ssh/*.pub";}
];
}
# ── GPG keys ─────────────────────────────────────────
{
id = "home-gpg";
enabled = true;
protection = "noAccess";
onlyIfExists = false;
patterns = [
{pattern = "~/.gnupg/**";}
{pattern = "~/*.gpg";}
{pattern = "~/.gpg-agent.conf";}
];
}
# ── AWS credentials ────────────────────────────────────
{
id = "home-aws";
enabled = true;
protection = "noAccess";
onlyIfExists = false;
patterns = [
{pattern = "~/.aws/**";}
{pattern = "~/.aws/credentials";}
{pattern = "~/.aws/config";}
];
}
# ── Kubernetes configs ────────────────────────────────
{
id = "home-kube";
enabled = true;
protection = "noAccess";
onlyIfExists = false;
patterns = [
{pattern = "~/.kube/**";}
{pattern = "*kubeconfig*";}
];
}
# ── Cloud CLI configs ────────────────────────────────
{
id = "home-config";
enabled = true;
protection = "noAccess";
onlyIfExists = false;
patterns = [
{pattern = "~/.config/gh/**";}
{pattern = "~/.config/gcloud/**";}
{pattern = "~/.config/op/**";}
{pattern = "~/.config/sops/**";}
];
}
# ── agenix secrets ───────────────────────────────────
{
id = "agenix-secrets";
enabled = true;
protection = "noAccess";
onlyIfExists = false;
patterns = [
{pattern = "/run/agenix/**";}
];
}
# ── Pi auth and sessions ────────────────────────────
{
id = "pi-auth-sessions";
enabled = true;
protection = "noAccess";
onlyIfExists = false;
patterns = [
{pattern = "~/.pi/agent/auth.json";}
{pattern = "~/.pi/agent/sessions/**";}
];
}
# ── Environment files ─────────────────────────────────
{
id = "secret-files";
enabled = true;
protection = "noAccess";
onlyIfExists = true;
patterns = [
{pattern = ".env";}
{pattern = ".env.*";}
{pattern = ".dev.vars";}
];
allowedPatterns = [
{pattern = "*.example.env";}
{pattern = "*.sample.env";}
{pattern = "*.test.env";}
{pattern = ".env.example";}
{pattern = ".env.sample";}
{pattern = ".env.test";}
];
}
# ── Private keys and certificates ───────────────────
{
id = "private-keys";
enabled = true;
protection = "noAccess";
onlyIfExists = false;
patterns = [
{pattern = "*.pem";}
{pattern = "*.key";}
{pattern = "*.p12";}
{pattern = "*.pfx";}
{pattern = "*id_rsa*";}
{pattern = "*id_ed25519*";}
{pattern = "*id_ecdsa*";}
];
allowedPatterns = [
{pattern = "*.pub";}
{pattern = "*.csr";}
];
}
];
};
permissionGate = {
explainCommands = false;
# Auto-deny patterns: env leakage and credential dumping
autoDenyPatterns = [
{
pattern = "\\benv\\b";
regex = true;
description = "env command (may dump environment)";
}
{
pattern = "\\bprintenv\\b";
regex = true;
description = "printenv command (dumps environment variables)";
}
{
pattern = "/proc/[0-9]+/environ";
regex = true;
description = "reading process environment files";
}
{
pattern = "gpg\\s+--export-secret-keys";
regex = true;
description = "GPG secret key export";
}
{
pattern = "gpg\\s+--export-secret-subkeys";
regex = true;
description = "GPG secret subkey export";
}
{
pattern = "ssh-add\\s+-D";
regex = true;
description = "delete all SSH identities";
}
{
pattern = "\\b(op|pass)\\s+(read|show|get)";
regex = true;
description = "password manager read operations";
}
];
};
};
};
# MCP servers auto-inherited from programs.mcp in default.nix
};
}
@@ -17,9 +17,6 @@ in {
bun bun
]; ];
home.file.".npmrc".text = ''
prefix=${npmGlobalPrefix}
'';
home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix; home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix;
}; };
} }
+1
View File
@@ -1,6 +1,7 @@
# Gaming profile aggregator — Steam platform, Gamescope session, and AMD GPU tools. # Gaming profile aggregator — Steam platform, Gamescope session, and AMD GPU tools.
{...}: { {...}: {
imports = [ imports = [
./emulators.nix
./steam.nix ./steam.nix
./gamescope.nix ./gamescope.nix
./gpu.nix ./gpu.nix
+18
View File
@@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.profiles.gaming.emulators;
in {
options.profiles.gaming.emulators.enable = mkEnableOption "Emulators";
config = mkIf cfg.enable {
home.packages = with pkgs; [
shadps4
shadps4-qtlauncher
];
};
}
+1
View File
@@ -16,6 +16,7 @@ in {
goverlay goverlay
mangohud mangohud
protonplus protonplus
wowup-cf
]; ];
}; };
} }
+1
View File
@@ -3,6 +3,7 @@
imports = [ imports = [
./obs.nix ./obs.nix
./ffmpeg.nix ./ffmpeg.nix
./graphics.nix
./yt-dlp.nix ./yt-dlp.nix
./kdenlive.nix ./kdenlive.nix
./handbrake.nix ./handbrake.nix
+1 -1
View File
@@ -15,7 +15,7 @@ in {
amf amf
ffmpeg_6-full ffmpeg_6-full
gst_all_1.gstreamer gst_all_1.gstreamer
gst_all_1.gst-vaapi gst_all_1.gst-plugins-bad
pamixer pamixer
pavucontrol pavucontrol
qpwgraph qpwgraph
+18
View File
@@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.profiles.media.graphics;
in {
options.profiles.media.graphics.enable = mkEnableOption "enable graphic tools";
config = mkIf cfg.enable {
home.packages = with pkgs; [
photocraft
inkscape
];
};
}
+12 -6
View File
@@ -89,17 +89,17 @@
"m3-atlas" = { "m3-atlas" = {
HostName = "152.53.85.162"; HostName = "152.53.85.162";
User = "m3tam3re"; User = "m3tam3re";
IdentityFile = "~/.ssh/m3tam3re"; IdentityFile = "~/.ssh/m3ta-adm";
}; };
"m3-hermes" = { "m3-hermes" = {
HostName = "204.168.229.93"; HostName = "204.168.229.93";
User = "m3tam3re"; User = "m3tam3re";
IdentityFile = "~/.ssh/m3tam3re"; IdentityFile = "~/.ssh/m3ta-adm";
}; };
"hermes" = { "hermes-agent" = {
HostName = "46.224.0.92"; HostName = "204.168.229.93";
User = "admin"; User = "hermes";
IdentityFile = "~/.ssh/m3tam3re"; IdentityFile = "~/.ssh/hermes";
}; };
"m3-zelda" = { "m3-zelda" = {
HostName = "95.217.189.186"; HostName = "95.217.189.186";
@@ -140,6 +140,12 @@
Port = 2022; Port = 2022;
IdentityFile = "~/.ssh/sascha.koenig"; IdentityFile = "~/.ssh/sascha.koenig";
}; };
"AZ-PLT-1" = {
HostName = "159.195.139.159";
User = "sascha.koenig";
Port = 2022;
IdentityFile = "~/.ssh/sascha.koenig";
};
"git.az-gruppe.com" = { "git.az-gruppe.com" = {
HostName = "git.az-gruppe.com"; HostName = "git.az-gruppe.com";
Port = 2022; Port = 2022;
+39 -16
View File
@@ -44,29 +44,52 @@
programs.ssh = { programs.ssh = {
enable = true; enable = true;
enableDefaultConfig = false; enableDefaultConfig = false;
matchBlocks = { settings = {
"m3-kratos" = {
HostName = "100.91.137.112";
User = "m3tam3re";
Port = 22;
IdentityFile = "~/.ssh/sascha.koenig";
};
"AZ-CLD-1" = { "AZ-CLD-1" = {
hostname = "152.53.186.119"; HostName = "152.53.186.119";
user = "sascha.koenig"; User = "sascha.koenig";
port = 2022; Port = 2022;
identityFile = "~/.ssh/sascha.koenig"; IdentityFile = "~/.ssh/sascha.koenig";
}; };
"AZ-PRM-1" = { "AZ-PRM-1" = {
hostname = "192.168.152.76"; HostName = "192.168.152.76";
user = "sascha.koenig"; User = "sascha.koenig";
port = 2022; Port = 2022;
identityFile = "~/.ssh/sascha.koenig"; IdentityFile = "~/.ssh/sascha.koenig";
};
"AZ-PLT-1" = {
HostName = "159.195.139.159";
User = "sascha.koenig";
Port = 2022;
IdentityFile = "~/.ssh/sascha.koenig";
};
"AZ-TC-01" = {
HostName = "192.168.153.172";
User = "sascha.koenig";
Port = 22;
IdentityFile = "~/.ssh/sascha.koenig";
}; };
"git.az-gruppe.com" = { "git.az-gruppe.com" = {
hostname = "git.az-gruppe.com"; HostName = "git.az-gruppe.com";
port = 2022; Port = 2022;
user = "sascha.koenig"; User = "sascha.koenig";
identityFile = "~/.ssh/sascha.koenig"; IdentityFile = "~/.ssh/sascha.koenig";
}; };
"code.m3ta.dev" = { "code.m3ta.dev" = {
hostname = "code.m3ta.dev"; HostName = "code.m3ta.dev";
user = "m3tam3re"; User = "m3tam3re";
identityFile = "~/.ssh/sascha.koenig"; IdentityFile = "~/.ssh/sascha.koenig";
};
"hermes-agent" = {
HostName = "204.168.229.93";
User = "hermes";
IdentityFile = "~/.ssh/hermes";
}; };
}; };
}; };
+9 -1
View File
@@ -11,7 +11,9 @@
pkgs, pkgs,
lib, lib,
... ...
}: { }: let
npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global";
in {
# ── Clipboard ── # ── Clipboard ──
services.cliphist = { services.cliphist = {
enable = true; enable = true;
@@ -25,4 +27,10 @@
# These are overridden by the identity module, but provide safe defaults. # These are overridden by the identity module, but provide safe defaults.
home.username = lib.mkDefault "m3tam3re"; home.username = lib.mkDefault "m3tam3re";
home.homeDirectory = lib.mkDefault "/home/${config.home.username}"; home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
home.file.".npmrc".text = ''
prefix=${npmGlobalPrefix}
@m3ta:registry=https://code.m3ta.dev/api/packages/m3tam3re/npm/
//code.m3ta.dev/api/packages/m3tam3re/npm/:_authToken=''${GITEA_TOKEN}
'';
} }