Skip to content

build(nix): add Nix flake for reproducible builds and dev shell#85

Merged
prakersh merged 1 commit into
onllm-dev:mainfrom
nilp0inter:main
Jul 23, 2026
Merged

build(nix): add Nix flake for reproducible builds and dev shell#85
prakersh merged 1 commit into
onllm-dev:mainfrom
nilp0inter:main

Conversation

@nilp0inter

Copy link
Copy Markdown
Contributor

Add flake.nix exposing:

  • packages.onwatch: static pure-Go binary via buildGoModule (tracks nixos-unstable)
  • devShell: go 1.26.4, gopls, gotools, gofumpt
  • apps.default: enables nix run .#onwatch

Includes:

  • .envrc for direnv integration
  • .gitignore updates for result/
  • Nix documentation in README.md and CLAUDE.md

Why nixos-unstable? The go.mod requires Go >= 1.25.7, but nixos-25.05 only ships Go 1.24 (and go_1_25 = 1.25.5). The flake tracks nixos-unstable which defaults to Go 1.26.x, satisfying the requirement while providing a reproducible, pinned toolchain.

vendorHash: Pinned from go.sum (sha256-zagPclPZItTTUaMh+8Ph7k5ESqc3vETPNkhMQ493MoY=). On go.sum changes, update this hash by running nix build .#onwatch and pasting the got: sha256-... value from the mismatch error.

Usage:

nix build .#onwatch      # Build -> ./result/bin/onwatch
nix run .#onwatch         # Build + run
nix develop               # Enter dev shell (or `direnv allow`)

See the "Nix" section in README.md for details.

Add flake.nix exposing:
- packages.onwatch: static pure-Go binary via buildGoModule (nixos-unstable)
- devShell: go 1.26.4, gopls, gotools, gofumpt
- apps.default for nix run

Includes .envrc for direnv integration, updated .gitignore for result/,
and Nix documentation in README.md and CLAUDE.md.

Flake tracks nixos-unstable because go.mod requires Go >= 1.25.7
(nixos-25.05 only ships Go 1.24). VendorHash is pinned from go.sum.
@prakersh
prakersh merged commit 40e25c2 into onllm-dev:main Jul 23, 2026
@prakersh prakersh mentioned this pull request Jul 23, 2026
prakersh added a commit that referenced this pull request Jul 23, 2026
- bump VERSION and README badge to 2.13.0
- README: add Moonshot + DeepSeek provider entries and env-var rows
- add docs/MOONSHOT_SETUP.md and docs/DEEPSEEK_SETUP.md
- .env.example: MOONSHOT_API_KEY / DEEPSEEK_API_KEY (opt-in)

Release bundles: Anthropic usage decode fix (#82/#90), Nix flake (#85),
menubar/dashboard fixes (#91-#98), auto_refresh_tokens toggle (#99),
Kimi Code (#88), Moonshot/DeepSeek (#68).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants