[GH-ISSUE #409] Add flake.nix and use it in opencode's flake #874

Open
opened 2026-03-14 08:53:21 +03:00 by kerem · 2 comments
Owner

Originally created by @b0o on GitHub (Dec 12, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/409

It would be very convenient if we could build opencode and opentui from source with nix. Opencode already has a flake.nix but it uses the version of opentui from npm. I've tried overriding this in an overlay but it's very hacky. First-class flake support would be very nice and make it easier to contribute to the projects versus using the current link-opentui-dev.sh script.

Originally created by @b0o on GitHub (Dec 12, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/409 It would be very convenient if we could build opencode and opentui from source with nix. Opencode already has a flake.nix but it uses the version of opentui from npm. I've tried overriding this in an overlay but it's very hacky. First-class flake support would be very nice and make it easier to contribute to the projects versus using the current `link-opentui-dev.sh` script.
Author
Owner

@kommander commented on GitHub (Dec 12, 2025):

I am not a nix user, neither do I even know what a flake is or how to use it, but I don't mind publishing it as such if that helps. Wouldn't know where to start though.

<!-- gh-comment-id:3646381545 --> @kommander commented on GitHub (Dec 12, 2025): I am not a nix user, neither do I even know what a flake is or how to use it, but I don't mind publishing it as such if that helps. Wouldn't know where to start though.
Author
Owner

@b0o commented on GitHub (Dec 13, 2025):

I might give it a shot and send a PR. For now, here's how I'm managing building my fork of opencode+opentui from source using a nix overlay: https://github.com/b0o/dotfiles/blob/main/nix/overlays/opencode.nix

It's quite hacky and requires performing surgery on node_modules to get the build working. But it works 😅

<!-- gh-comment-id:3649588660 --> @b0o commented on GitHub (Dec 13, 2025): I might give it a shot and send a PR. For now, here's how I'm managing building my fork of opencode+opentui from source using a nix overlay: https://github.com/b0o/dotfiles/blob/main/nix/overlays/opencode.nix It's quite hacky and requires performing surgery on `node_modules` to get the build working. But it works 😅
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#874
No description provided.