opencode: fix config file location
Some checks are pending
/ triage (push) Waiting to run
GitHub Pages / publish (ubuntu-latest) (push) Waiting to run

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:
Jairo Llopis 2026-01-22 10:35:22 +00:00 committed by Austin Horstman
parent 356a88a574
commit 082a4cd87c
6 changed files with 11 additions and 11 deletions

View file

@ -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";
}

View file

@ -4,6 +4,6 @@
settings = { };
};
nmt.script = ''
assertPathNotExists home-files/.config/opencode/config.json
assertPathNotExists home-files/.config/opencode/opencode.json
'';
}

View file

@ -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}
'';
}

View file

@ -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}
'';
}

View file

@ -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}
'';
}