feat(opencode): deploy rules/ to ~/.config/opencode/rules/ via home-manager
- Add xdg.configFile entry for opencode/rules - Rules deployed alongside skills, commands, context, prompts Refs: T4 of rules-system plan
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{inputs, ...}: {
|
{ inputs, ... }: {
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"opencode/commands" = {
|
"opencode/commands" = {
|
||||||
source = "${inputs.agents}/commands";
|
source = "${inputs.agents}/commands";
|
||||||
@@ -16,20 +16,23 @@
|
|||||||
source = "${inputs.agents}/skills";
|
source = "${inputs.agents}/skills";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
|
"opencode/rules" = {
|
||||||
|
source = "${inputs.agents}/rules";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.opencode = {
|
programs.opencode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "opencode";
|
theme = "opencode";
|
||||||
plugin = ["oh-my-opencode" "opencode-antigravity-auth@beta"];
|
plugin = [ "oh-my-opencode" "opencode-antigravity-auth@beta" ];
|
||||||
agent =
|
agent = builtins.fromJSON
|
||||||
builtins.fromJSON
|
|
||||||
(builtins.readFile "${inputs.agents}/agents/agents.json");
|
(builtins.readFile "${inputs.agents}/agents/agents.json");
|
||||||
formatter = {
|
formatter = {
|
||||||
alejandra = {
|
alejandra = {
|
||||||
command = ["alejandra" "-q" "-"];
|
command = [ "alejandra" "-q" "-" ];
|
||||||
extensions = [".nix"];
|
extensions = [ ".nix" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mcp = {
|
mcp = {
|
||||||
@@ -93,12 +96,12 @@
|
|||||||
output = 65535;
|
output = 65535;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
variants = {
|
variants = {
|
||||||
low = {thinkingLevel = "low";};
|
low = { thinkingLevel = "low"; };
|
||||||
high = {thinkingLevel = "high";};
|
high = { thinkingLevel = "high"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
antigravity-gemini-3-flash = {
|
antigravity-gemini-3-flash = {
|
||||||
@@ -108,14 +111,14 @@
|
|||||||
output = 65536;
|
output = 65536;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
variants = {
|
variants = {
|
||||||
minimal = {thinkingLevel = "minimal";};
|
minimal = { thinkingLevel = "minimal"; };
|
||||||
low = {thinkingLevel = "low";};
|
low = { thinkingLevel = "low"; };
|
||||||
medium = {thinkingLevel = "medium";};
|
medium = { thinkingLevel = "medium"; };
|
||||||
high = {thinkingLevel = "high";};
|
high = { thinkingLevel = "high"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
antigravity-claude-sonnet-4-5 = {
|
antigravity-claude-sonnet-4-5 = {
|
||||||
@@ -125,8 +128,8 @@
|
|||||||
output = 64000;
|
output = 64000;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
antigravity-claude-sonnet-4-5-thinking = {
|
antigravity-claude-sonnet-4-5-thinking = {
|
||||||
@@ -136,12 +139,12 @@
|
|||||||
output = 64000;
|
output = 64000;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
variants = {
|
variants = {
|
||||||
low = {thinkingConfig = {thinkingBudget = 8192;};};
|
low = { thinkingConfig = { thinkingBudget = 8192; }; };
|
||||||
max = {thinkingConfig = {thinkingBudget = 32768;};};
|
max = { thinkingConfig = { thinkingBudget = 32768; }; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
antigravity-claude-opus-4-6-thinking = {
|
antigravity-claude-opus-4-6-thinking = {
|
||||||
@@ -151,12 +154,12 @@
|
|||||||
output = 64000;
|
output = 64000;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
variants = {
|
variants = {
|
||||||
low = {thinkingConfig = {thinkingBudget = 8192;};};
|
low = { thinkingConfig = { thinkingBudget = 8192; }; };
|
||||||
max = {thinkingConfig = {thinkingBudget = 32768;};};
|
max = { thinkingConfig = { thinkingBudget = 32768; }; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"gemini-2.5-flash" = {
|
"gemini-2.5-flash" = {
|
||||||
@@ -166,8 +169,8 @@
|
|||||||
output = 65536;
|
output = 65536;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"gemini-2.5-pro" = {
|
"gemini-2.5-pro" = {
|
||||||
@@ -177,8 +180,8 @@
|
|||||||
output = 65536;
|
output = 65536;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"gemini-3-flash-preview" = {
|
"gemini-3-flash-preview" = {
|
||||||
@@ -188,8 +191,8 @@
|
|||||||
output = 65536;
|
output = 65536;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"gemini-3-pro-preview" = {
|
"gemini-3-pro-preview" = {
|
||||||
@@ -199,8 +202,8 @@
|
|||||||
output = 65535;
|
output = 65535;
|
||||||
};
|
};
|
||||||
modalities = {
|
modalities = {
|
||||||
input = ["text" "image" "pdf"];
|
input = [ "text" "image" "pdf" ];
|
||||||
output = ["text"];
|
output = [ "text" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -210,62 +213,31 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/opencode/oh-my-opencode.json".text = builtins.toJSON {
|
home.file.".config/opencode/oh-my-opencode.json".text = builtins.toJSON {
|
||||||
"$schema" = "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json";
|
"$schema" =
|
||||||
|
"https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json";
|
||||||
# google_auth removed - use opencode-antigravity-auth plugin instead (already in plugin array)
|
# google_auth removed - use opencode-antigravity-auth plugin instead (already in plugin array)
|
||||||
agents = {
|
agents = {
|
||||||
sisyphus = {
|
sisyphus = { model = "zai-coding-plan/glm-5"; };
|
||||||
model = "zai-coding-plan/glm-5";
|
oracle = { model = "zai-coding-plan/glm-5"; };
|
||||||
};
|
librarian = { model = "zai-coding-plan/glm-5"; };
|
||||||
oracle = {
|
explore = { model = "zai-coding-plan/glm-4.5-air"; };
|
||||||
model = "zai-coding-plan/glm-5";
|
multimodal-looker = { model = "zai-coding-plan/glm-4.6v"; };
|
||||||
};
|
prometheus = { model = "zai-coding-plan/glm-5"; };
|
||||||
librarian = {
|
metis = { model = "zai-coding-plan/glm-5"; };
|
||||||
model = "zai-coding-plan/glm-5";
|
momus = { model = "zai-coding-plan/glm-5"; };
|
||||||
};
|
atlas = { model = "zai-coding-plan/glm-5"; };
|
||||||
explore = {
|
|
||||||
model = "zai-coding-plan/glm-4.5-air";
|
|
||||||
};
|
|
||||||
multimodal-looker = {
|
|
||||||
model = "zai-coding-plan/glm-4.6v";
|
|
||||||
};
|
|
||||||
prometheus = {
|
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
metis = {
|
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
momus = {
|
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
atlas = {
|
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
categories = {
|
categories = {
|
||||||
visual-engineering = {
|
visual-engineering = { model = "zai-coding-plan/glm-5"; };
|
||||||
model = "zai-coding-plan/glm-5";
|
ultrabrain = { model = "zai-coding-plan/glm-5"; };
|
||||||
};
|
artistry = { model = "zai-coding-plan/glm-5"; };
|
||||||
ultrabrain = {
|
quick = { model = "zai-coding-plan/glm-5"; };
|
||||||
model = "zai-coding-plan/glm-5";
|
unspecified-low = { model = "zai-coding-plan/glm-5"; };
|
||||||
};
|
unspecified-high = { model = "zai-coding-plan/glm-5"; };
|
||||||
artistry = {
|
writing = { model = "zai-coding-plan/glm-5"; };
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
quick = {
|
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
unspecified-low = {
|
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
unspecified-high = {
|
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
writing = {
|
|
||||||
model = "zai-coding-plan/glm-5";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
disabled_mcps = ["context7" "websearch"];
|
disabled_mcps = [ "context7" "websearch" ];
|
||||||
disabled_hooks = ["comment-checker"];
|
disabled_hooks = [ "comment-checker" ];
|
||||||
git_master = {
|
git_master = {
|
||||||
commit_footer = false;
|
commit_footer = false;
|
||||||
include_co_authored_by = false;
|
include_co_authored_by = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user