added lots
This commit is contained in:
parent
14205e371f
commit
1dd4440047
14 changed files with 595 additions and 224 deletions
|
|
@ -8,6 +8,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
googleWorkspaceStateDir = "/home/fw/.local/share/google-workspace-mcp/${myhostname}";
|
||||
in
|
||||
{
|
||||
options.opencode.mcpEnabled = mkOption {
|
||||
|
|
@ -18,6 +19,8 @@ in
|
|||
github = true;
|
||||
jira = true;
|
||||
google = false;
|
||||
mssql = false;
|
||||
vault = false;
|
||||
};
|
||||
description = "Per-host MCP enablement flags for OpenCode servers.";
|
||||
};
|
||||
|
|
@ -48,6 +51,22 @@ in
|
|||
"$schema" = "https://opencode.ai/config.json";
|
||||
theme = lib.mkForce "catppuccin";
|
||||
plugin = [ "@ex-machina/opencode-anthropic-auth" ];
|
||||
provider = {
|
||||
ollama = {
|
||||
npm = "@ai-sdk/openai-compatible";
|
||||
options = {
|
||||
baseURL = "http://localhost:11434/v1";
|
||||
};
|
||||
models = {
|
||||
# Only include models that support function calling (tools)
|
||||
"gemma2:latest" = {};
|
||||
"llama3.1:8b" = {};
|
||||
"qwen2.5-coder:14b" = {};
|
||||
"qwen2.5-coder:32b" = {};
|
||||
# Note: deepseek-coder models and codellama:13b don't support tools
|
||||
};
|
||||
};
|
||||
};
|
||||
mcp = {
|
||||
az = {
|
||||
type = "local";
|
||||
|
|
@ -112,12 +131,12 @@ in
|
|||
"run"
|
||||
"-i"
|
||||
"--rm"
|
||||
"--network"
|
||||
"host"
|
||||
"--network"
|
||||
"host"
|
||||
"--user"
|
||||
"1000:100"
|
||||
"-v"
|
||||
"/home/fw/.local/share/google-workspace-mcp:/home/app/.google_workspace_mcp"
|
||||
"${googleWorkspaceStateDir}:/home/app/.google_workspace_mcp"
|
||||
"-e"
|
||||
"GOOGLE_OAUTH_CLIENT_ID"
|
||||
"-e"
|
||||
|
|
@ -134,6 +153,38 @@ in
|
|||
];
|
||||
enabled = config.opencode.mcpEnabled.google or false;
|
||||
};
|
||||
mssql = {
|
||||
type = "local";
|
||||
command = [
|
||||
"nix"
|
||||
"shell"
|
||||
"nixpkgs#uv"
|
||||
"nixpkgs#freetds"
|
||||
"-c"
|
||||
"uvx"
|
||||
"--from"
|
||||
"git+https://github.com/RichardHan/mssql_mcp_server.git@77b0c6a9771e3f83a54c03dad42f1a53e0a20d0e"
|
||||
"mssql_mcp_server"
|
||||
];
|
||||
enabled = config.opencode.mcpEnabled.mssql or false;
|
||||
};
|
||||
vault = {
|
||||
type = "local";
|
||||
command = [
|
||||
"docker"
|
||||
"run"
|
||||
"-i"
|
||||
"--rm"
|
||||
"-e"
|
||||
"VAULT_ADDR"
|
||||
"-e"
|
||||
"VAULT_TOKEN"
|
||||
"-e"
|
||||
"VAULT_NAMESPACE"
|
||||
"hashicorp/vault-mcp-server"
|
||||
];
|
||||
enabled = config.opencode.mcpEnabled.vault or false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -145,6 +196,33 @@ in
|
|||
fi
|
||||
'';
|
||||
|
||||
home.activation.googleWorkspaceMcpState = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p "${googleWorkspaceStateDir}"
|
||||
'';
|
||||
|
||||
home.file.".config/opencode/session-prompt.txt".text = ''
|
||||
Session instructions for this entire chat:
|
||||
|
||||
1) Tooling / binaries
|
||||
- Always use Nix for binaries and tool execution.
|
||||
- Prefer `nix shell nixpkgs#<tool> -c <command>` (or `nix develop -c <command>` if the repo already defines a dev shell).
|
||||
- Do not run tools directly from global/system installs unless I explicitly ask.
|
||||
|
||||
2) Daily note logging
|
||||
- Track general work notes in: /home/fw/knowledge/notes/daily
|
||||
- Use today's daily note file (create it if missing) and keep it updated as work progresses.
|
||||
- Add short, timestamped entries for meaningful actions/decisions.
|
||||
|
||||
3) Schedule updates
|
||||
- In today's daily note, maintain a "Schedule" section/tab and keep it current with what we are actively doing.
|
||||
- When tasks change, update Schedule first, then continue implementation.
|
||||
- Keep Schedule concise and action-oriented.
|
||||
|
||||
4) Working style
|
||||
- Don't ask for confirmation on normal steps; proceed with sensible defaults.
|
||||
- Only ask when blocked, destructive, or security-sensitive.
|
||||
'';
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
# theme = "catppuccin_${theme}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue