opencode flake moving
This commit is contained in:
60
nix/flakes/opencode/flake.lock
generated
Normal file
60
nix/flakes/opencode/flake.lock
generated
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1752781635,
|
||||
"narHash": "sha256-eveRosa7OLVqCbAccV5Azu7ICM1s7xPulWsLQU0bnig=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "981f2095b201d5f61e81c6cecc054c3a2a130d0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
75
nix/flakes/opencode/flake.nix
Normal file
75
nix/flakes/opencode/flake.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
description = "OpenCode MCP dev shell";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
opencodeConfig = {
|
||||
"$schema" = "https://opencode.ai/config.json";
|
||||
theme = "github";
|
||||
provider = {
|
||||
ollama = {
|
||||
npm = "@ai-sdk/openai-compatible";
|
||||
options = {
|
||||
baseURL = "http://ai-snow.reindeer-pinecone.ts.net:11434/v1";
|
||||
};
|
||||
models = {
|
||||
"llama3.1:70b" = { };
|
||||
"deepseek-r1:70b" = { };
|
||||
"mistral:latest" = { };
|
||||
"qwen3:32b" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
mcp = {
|
||||
playwright = {
|
||||
type = "local";
|
||||
command = [
|
||||
"npx"
|
||||
"-y"
|
||||
"@playwright/mcp@latest"
|
||||
"--executable-path"
|
||||
"${pkgs.chromium}/bin/chromium"
|
||||
"--no-sandbox"
|
||||
];
|
||||
};
|
||||
sequential_thinking = {
|
||||
type = "local";
|
||||
command = [
|
||||
"npx"
|
||||
"-y"
|
||||
"@modelcontextprotocol/server-sequential-thinking"
|
||||
];
|
||||
};
|
||||
discord_bot = {
|
||||
type = "local";
|
||||
command = [
|
||||
"npx"
|
||||
"-y"
|
||||
"@pyroprompts/mcp-stdio-to-streamable-http-adapter"
|
||||
];
|
||||
environment = {
|
||||
URI = "http://server.alexmickelson.guru:5678/mcp/";
|
||||
MCP_NAME = "discord_bot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
configJson = pkgs.writeTextFile {
|
||||
name = "config.json";
|
||||
text = builtins.toJSON opencodeConfig;
|
||||
};
|
||||
in {
|
||||
packages = rec {
|
||||
opencode = pkgs.writeShellScriptBin "opencode" ''
|
||||
mkdir -p ~/.config/opencode
|
||||
cp ${configJson} ~/.config/opencode/opencode.json
|
||||
${pkgs.opencode}/bin/opencode
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user