| name | dotfiles-config |
| description | Explains how OpenCode config (AGENTS.md, opencode.json, commands/, skills/, agents/, plugins/) is generated by Nix Home Manager from the dotfiles flake. Use when the user wants to edit OpenCode configuration, add a command/skill/plugin, change a permission, change MCP settings, or asks where their config lives — to avoid editing the read-only /nix/store mirrors directly. |
Dotfiles & OpenCode config
OpenCode config under ~/.config/opencode/{AGENTS.md, opencode.json, commands/, skills/, agents/, plugins/} is generated by Nix Home Manager from the dotfiles flake. Each entry is a symlink into /nix/store/... and is read-only. Editing the symlinked files directly will fail or be reverted on the next activation.
To change OpenCode config, edit the source files in the dotfiles git repo, then run bash setup.sh. Public sources live at <dotfiles>/config/opencode/; private overlays live at ~/.config/dotfiles/opencode/. External imports (skills/commands/JSON fragments from non-Nix repos) are declared via opencode.imports in the private flake — see the dotfiles AGENTS.md (root meta-doc) for the full merge model.
The dotfiles repo path varies per machine. Use the agent's working_directory context, the ~/.config/opencode/<file> symlink target (which resolves into /nix/store/.../source/... matching the public repo layout), or ask the user. Do not invent a path.