Add android development environment and added appropiate opencode models for free subscription
This commit is contained in:
@@ -1,15 +1,14 @@
|
|||||||
{pkgs, ...}: let
|
{ pkgs, ... }:
|
||||||
languages = import ./_languages.nix {inherit pkgs;};
|
let
|
||||||
|
languages = import ./_languages.nix { inherit pkgs; };
|
||||||
providers = import ./_providers.nix;
|
providers = import ./_providers.nix;
|
||||||
skills = import ./_skills.nix {inherit pkgs;};
|
skills = import ./_skills.nix { inherit pkgs; };
|
||||||
|
|
||||||
inherit (pkgs) opencode;
|
inherit (pkgs) opencode;
|
||||||
|
|
||||||
opencodeEnv = pkgs.buildEnv {
|
opencodeEnv = pkgs.buildEnv {
|
||||||
name = "opencode-env";
|
name = "opencode-env";
|
||||||
paths =
|
paths = languages.packages ++ skills.packages;
|
||||||
languages.packages
|
|
||||||
++ skills.packages;
|
|
||||||
};
|
};
|
||||||
opencodeInitScript = pkgs.writeShellScript "opencode-init" ''
|
opencodeInitScript = pkgs.writeShellScript "opencode-init" ''
|
||||||
mkdir -p "$HOME/.local/cache/opencode/node_modules/@opencode-ai"
|
mkdir -p "$HOME/.local/cache/opencode/node_modules/@opencode-ai"
|
||||||
@@ -24,105 +23,123 @@
|
|||||||
'';
|
'';
|
||||||
opencodeWrapped =
|
opencodeWrapped =
|
||||||
pkgs.runCommand "opencode-wrapped" {
|
pkgs.runCommand "opencode-wrapped" {
|
||||||
buildInputs = [pkgs.makeWrapper];
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
} ''
|
} ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
makeWrapper ${opencodeInitScript} $out/bin/opencode \
|
makeWrapper ${opencodeInitScript} $out/bin/opencode \
|
||||||
--prefix PATH : ${opencodeEnv}/bin \
|
--prefix PATH : ${opencodeEnv}/bin \
|
||||||
--prefix LD_LIBRARY_PATH : "${pkgs.lib.makeLibraryPath [pkgs.stdenv.cc.cc.lib]}"
|
--prefix LD_LIBRARY_PATH : "${pkgs.lib.makeLibraryPath [pkgs.stdenv.cc.cc.lib]}"
|
||||||
'';
|
'';
|
||||||
configFile = "opencode/config.json";
|
configFile = "opencode/config.json";
|
||||||
tuiFile = "opencode/tui.json";
|
tuiFile = "opencode/tui.json";
|
||||||
in {
|
in {
|
||||||
users.users.someone.packages = [
|
users.users.someone.packages = [
|
||||||
opencodeWrapped
|
opencodeWrapped
|
||||||
];
|
];
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"${configFile}".text = builtins.toJSON {
|
"${configFile}".text = builtins.toJSON {
|
||||||
"$schema" = "https://opencode.ai/config.json";
|
"$schema" = "https://opencode.ai/config.json";
|
||||||
plugin = [
|
plugin = [
|
||||||
"opencode-antigravity-auth@latest"
|
"opencode-antigravity-auth@latest"
|
||||||
"@tarquinen/opencode-dcp@latest"
|
"@tarquinen/opencode-dcp@latest"
|
||||||
"oh-my-openagent@latest"
|
"oh-my-openagent@latest"
|
||||||
];
|
];
|
||||||
model = "google/antigravity-gemini-3-flash";
|
model = "google/antigravity-gemini-3-flash";
|
||||||
small_model = "opencode/big-pickle";
|
small_model = "opencode/big-pickle";
|
||||||
autoupdate = false;
|
autoupdate = false;
|
||||||
agent = {
|
agent = {
|
||||||
build = {model = "opencode/nemotron-3-super-free";};
|
build = { model = "opencode/nemotron-3-super-free"; };
|
||||||
plan = {model = "opencode/big-pickle";};
|
plan = { model = "opencode/big-pickle"; };
|
||||||
task = {model = "opencode/nemotron-3-super-free";};
|
task = { model = "opencode/nemotron-3-super-free"; };
|
||||||
"Sisyphus-Junior" = {model = "opencode/nemotron-3-super-free";};
|
"sisyphus-junior" = { model = "opencode/nemotron-3-super-free"; };
|
||||||
explore = {model = "opencode/minimax-m2.5-free";};
|
explore = { model = "opencode/minimax-m2.5-free"; };
|
||||||
general = {model = "opencode/big-pickle";};
|
general = { model = "opencode/big-pickle"; };
|
||||||
oracle = {model = "opencode/nemotron-3-super-free";};
|
oracle = { model = "opencode/nemotron-3-super-free"; };
|
||||||
"ultrabrain" = {model = "opencode/nemotron-3-super-free";};
|
"ultrabrain" = { model = "opencode/nemotron-3-super-free"; };
|
||||||
"deep" = {model = "opencode/nemotron-3-super-free";};
|
"deep" = { model = "opencode/nemotron-3-super-free"; };
|
||||||
"quick" = {model = "opencode/gpt-5-nano";};
|
"quick" = { model = "opencode/gpt-5-nano"; };
|
||||||
"artistry" = {model = "opencode/nemotron-3-super-free";};
|
"artistry" = { model = "opencode/nemotron-3-super-free"; };
|
||||||
"visual-engineering" = {model = "opencode/hy3-preview-free";};
|
"visual-engineering" = { model = "opencode/hy3-preview-free"; };
|
||||||
"writing" = {model = "opencode/hy3-preview-free";};
|
"writing" = { model = "opencode/hy3-preview-free"; };
|
||||||
};
|
};
|
||||||
share = "disabled";
|
share = "disabled";
|
||||||
disabled_providers = [
|
disabled_providers = [
|
||||||
"amazon-bedrock"
|
"amazon-bedrock"
|
||||||
"anthropic"
|
"anthropic"
|
||||||
"azure-openai"
|
"azure-openai"
|
||||||
"azure-cognitive-services"
|
"azure-cognitive-services"
|
||||||
"baseten"
|
"baseten"
|
||||||
"cerebras"
|
"cerebras"
|
||||||
"cloudflare-ai-gateway"
|
"cloudflare-ai-gateway"
|
||||||
"cortecs"
|
"cortecs"
|
||||||
"deep-infra"
|
"deep-infra"
|
||||||
"fireworks-ai"
|
"fireworks-ai"
|
||||||
"google-vertex-ai"
|
"google-vertex-ai"
|
||||||
"groq"
|
"groq"
|
||||||
"hugging-face"
|
"hugging-face"
|
||||||
"helicone"
|
"helicone"
|
||||||
"llama.cpp"
|
"llama.cpp"
|
||||||
"io-net"
|
"io-net"
|
||||||
"lmstudio"
|
"lmstudio"
|
||||||
"moonshot-ai"
|
"moonshot-ai"
|
||||||
"nebius-token-factory"
|
"nebius-token-factory"
|
||||||
"ollama"
|
"ollama"
|
||||||
"ollama-cloud"
|
"ollama-cloud"
|
||||||
"openai"
|
"openai"
|
||||||
"sap-ai-core"
|
"sap-ai-core"
|
||||||
"ovhcloud-ai-endpoints"
|
"ovhcloud-ai-endpoints"
|
||||||
"together-ai"
|
"together-ai"
|
||||||
"venice-ai"
|
"venice-ai"
|
||||||
"xai"
|
"xai"
|
||||||
"zai"
|
"zai"
|
||||||
"zenmux"
|
"zenmux"
|
||||||
];
|
];
|
||||||
enabled_providers = ["opencode" "google" "openrouter"];
|
enabled_providers = [ "opencode" "google" "openrouter" ];
|
||||||
mcp = {
|
mcp = {
|
||||||
gh_grep = {
|
gh_grep = {
|
||||||
type = "remote";
|
type = "remote";
|
||||||
url = "https://mcp.grep.app/";
|
url = "https://mcp.grep.app/";
|
||||||
enabled = true;
|
enabled = true;
|
||||||
timeout = 10000;
|
timeout = 10000;
|
||||||
};
|
};
|
||||||
deepwiki = {
|
deepwiki = {
|
||||||
type = "remote";
|
type = "remote";
|
||||||
url = "https://mcp.deepwiki.com/mcp";
|
url = "https://mcp.deepwiki.com/mcp";
|
||||||
enabled = true;
|
enabled = true;
|
||||||
timeout = 10000;
|
timeout = 10000;
|
||||||
};
|
};
|
||||||
context7 = {
|
context7 = {
|
||||||
type = "remote";
|
type = "remote";
|
||||||
url = "https://mcp.context7.com/mcp";
|
url = "https://mcp.context7.com/mcp";
|
||||||
enabled = true;
|
enabled = true;
|
||||||
timeout = 10000;
|
timeout = 10000;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit (languages) formatter lsp;
|
inherit (languages) formatter lsp;
|
||||||
provider = providers.config;
|
provider = providers.config;
|
||||||
};
|
};
|
||||||
"${tuiFile}".text = builtins.toJSON {
|
|
||||||
"$schema" = "https://opencode.ai/tui.json";
|
"opencode/oh-my-openagent.json".text = builtins.toJSON {
|
||||||
theme = "gruvbox";
|
"$schema" = "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/master/assets/oh-my-opencode.schema.json";
|
||||||
};
|
agents = {
|
||||||
"opencode/skill".source = skills.skillsSource + "/skill";
|
"sisyphus-junior" = { model = "opencode/nemotron-3-super-free"; };
|
||||||
};
|
};
|
||||||
}
|
categories = {
|
||||||
|
"quick" = { model = "opencode/gpt-5-nano"; };
|
||||||
|
"ultrabrain" = { model = "opencode/nemotron-3-super-free"; };
|
||||||
|
"deep" = { model = "opencode/nemotron-3-super-free"; };
|
||||||
|
"visual-engineering" = { model = "opencode/hy3-preview-free"; };
|
||||||
|
"writing" = { model = "opencode/hy3-preview-free"; };
|
||||||
|
"unspecified-low" = { model = "opencode/gpt-5-nano"; };
|
||||||
|
"unspecified-high" = { model = "opencode/nemotron-3-super-free"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"${tuiFile}".text = builtins.toJSON {
|
||||||
|
"$schema" = "https://opencode.ai/tui.json";
|
||||||
|
theme = "gruvbox";
|
||||||
|
};
|
||||||
|
|
||||||
|
"opencode/skill".source = skills.skillsSource + "/skill";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user