The forgejo-sandbox / reforge harness, lifted out of the machine config into a host-agnostic, generic engine anyone can consume with Nix. Two layers: - engine (this repo) — nixosModules.reforge stands up the sandbox forge, provisions role accounts + tokens, enforces branch protection, and puts the reforge-* CLI + forgejo-mcp on PATH. Carries no project specifics. - run config — per-project manifest/charter/agenda/issues an adopter fills in; scaffold one with the `reforge` flake template. Portability fixes vs the in-config version: - forgejo-mcp resolved from $REFORGE_MCP_BIN or PATH, never a named host (kills the nixosConfigurations.omni hardcode). - all instance data + paths parameterized via REFORGE_* env, baked into the reforge-scripts wrappers from module options (configDir, agentsDir, refsDir, org, port, tokenOwner, ...). - option namespace neutral (reforge.* not omni.packs.*); settings policies carry no absolute /etc/nixos paths. - role briefs + orchestrator playbook genericized: all project specifics point at the charter; refs corpus optional. Validated: nix flake check (eval) + builds of forgejo-mcp, reforge-scripts, and a module-eval check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
42 lines
999 B
Nix
42 lines
999 B
Nix
# packages/forgejo-mcp.nix
|
|
#
|
|
# forgejo-mcp — Model Context Protocol server for the Forgejo REST API.
|
|
# Upstream: https://codeberg.org/goern/forgejo-mcp (de-facto community
|
|
# implementation; no official forgejo/forgejo-mcp org repo exists yet).
|
|
# Sessions use this binary to drive the sandbox forge over MCP.
|
|
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitea,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "forgejo-mcp";
|
|
version = "2.17.0";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "codeberg.org";
|
|
owner = "goern";
|
|
repo = "forgejo-mcp";
|
|
rev = "v${version}";
|
|
hash = "sha256-DcpS2467MCFfIVsdYEfd5t6kPjMeLElMQbDyuXI04XE=";
|
|
};
|
|
|
|
vendorHash = "sha256-5CV4drUaYKtZ/RoydAatblhsqU8VWYzYByjhcb9KZVY=";
|
|
|
|
subPackages = [ "." ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "Model Context Protocol server for Forgejo REST API";
|
|
homepage = "https://codeberg.org/goern/forgejo-mcp";
|
|
license = licenses.asl20;
|
|
mainProgram = "forgejo-mcp";
|
|
};
|
|
}
|