You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NixOS: custom tools fail because they cannot find imported modules #5914
On NixOS after configuring custom tools, for any message that I sent I only got error messages like
cannot find module '@opencode-ai/plugin' (when I tried to symlink my tools from my nixOS repo into the Opencode config repo)
and
ENOENT reading "/nix/store/somethingsomething...-opencode-.1.0.184/lib/opencode/node_modules/@opencode-ai/plugin/node_modules/zod" (when I let NixOS copy my tools from my NixOS repo into the Opencode config dir on rebuild)
After much trying around I've managed to make it work on my fork:
But since I'm not experienced at all with NixOS packaging I honestly have no idea if this is a clean way to do it and if it's worth a PR. But I hope that it can maybe at least be a starting point for someone more competent than me 😆
OpenCode version
1.0.184
Steps to reproduce
Install Opencode on NixOS with opencode.url = "github:sst/opencode (in flake.nix)
@rekram1-node I'm not sure if you closed this because it looks like it's a NixOS-specific issue, but it isn't. #11001 is the same problem reported on macOS. (I don't know why the post author closed that issue as completed, no solution was given.)
Activity
megalithic commentedon Dec 27, 2025
getting this one too
github-actions commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
dani0854 commentedon Apr 10, 2026
I have same problem, have to copy custom tools instead of linking them.
ElnuDev commentedon Nov 10, 2026
@rekram1-node I'm not sure if you closed this because it looks like it's a NixOS-specific issue, but it isn't. #11001 is the same problem reported on macOS. (I don't know why the post author closed that issue as completed, no solution was given.)