Skip to content

Commit bcbfd62

Browse files
committed
ai-agents: disable opencode file watching
To work around anomalyco/opencode#55367
1 parent e7fb96e commit bcbfd62

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎modules/home/ai/ai-agents.nix‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,18 @@
136136
};
137137
};
138138

139+
# Disable opencode's file watcher: on NixOS it exhausts the system-wide
140+
# inotify watch budget (https://github.com/anomalyco/opencode/issues/55367).
139141
programs.opencode = {
140-
package = pkgs.llm-agents.opencode2;
142+
package = pkgs.symlinkJoin {
143+
name = "opencode2";
144+
paths = [ pkgs.llm-agents.opencode2 ];
145+
nativeBuildInputs = [ pkgs.makeWrapper ];
146+
postBuild = ''
147+
wrapProgram $out/bin/opencode2 \
148+
--set OPENCODE_DISABLE_FILEWATCHER true
149+
'';
150+
};
141151
enableMcpIntegration = true;
142152
settings = {
143153
plugin = [ "${ponytail}/.opencode/plugins/ponytail.mjs" ];

0 commit comments

Comments
 (0)