opencode: fix config file location
The file should be named `opencode.json`, not `config.json`. Docs: https://opencode.ai/docs/config/#global @moduon MT-13030
This commit is contained in:
committed by
Austin Horstman
parent
356a88a574
commit
082a4cd87c
@@ -80,7 +80,7 @@ in
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to {file}`$XDG_CONFIG_HOME/opencode/config.json`.
|
||||
Configuration written to {file}`$XDG_CONFIG_HOME/opencode/opencode.json`.
|
||||
See <https://opencode.ai/docs/config/> for the documentation.
|
||||
|
||||
Note, `"$schema": "https://opencode.ai/config.json"` is automatically added to the configuration.
|
||||
@@ -336,7 +336,7 @@ in
|
||||
home.packages = mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
xdg.configFile = {
|
||||
"opencode/config.json" = mkIf (cfg.settings != { } || transformedMcpServers != { }) {
|
||||
"opencode/opencode.json" = mkIf (cfg.settings != { } || transformedMcpServers != { }) {
|
||||
source =
|
||||
let
|
||||
# Merge MCP servers: transformed servers + user settings, with user settings taking precedence
|
||||
@@ -345,7 +345,7 @@ in
|
||||
mergedSettings =
|
||||
cfg.settings // (lib.optionalAttrs (mergedMcpServers != { }) { mcp = mergedMcpServers; });
|
||||
in
|
||||
jsonFormat.generate "config.json" (
|
||||
jsonFormat.generate "opencode.json" (
|
||||
{
|
||||
"$schema" = "https://opencode.ai/config.json";
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
settings = { };
|
||||
};
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/opencode/config.json
|
||||
assertPathNotExists home-files/.config/opencode/opencode.json
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/opencode/config.json
|
||||
assertFileContent home-files/.config/opencode/config.json \
|
||||
assertFileExists home-files/.config/opencode/opencode.json
|
||||
assertFileContent home-files/.config/opencode/opencode.json \
|
||||
${./mcp-integration-with-override.json}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/opencode/config.json
|
||||
assertFileContent home-files/.config/opencode/config.json \
|
||||
assertFileExists home-files/.config/opencode/opencode.json
|
||||
assertFileContent home-files/.config/opencode/opencode.json \
|
||||
${./mcp-integration.json}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
};
|
||||
};
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/opencode/config.json
|
||||
assertFileContent home-files/.config/opencode/config.json \
|
||||
${./config.json}
|
||||
assertFileExists home-files/.config/opencode/opencode.json
|
||||
assertFileContent home-files/.config/opencode/opencode.json \
|
||||
${./opencode.json}
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user