Skip to content

refactor: replace Nix flake with mise#45

Merged
ThomasK33 merged 2 commits into
mainfrom
refactor/replace-nix-with-mise
Jun 1, 2026
Merged

refactor: replace Nix flake with mise#45
ThomasK33 merged 2 commits into
mainfrom
refactor/replace-nix-with-mise

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

Drops the Nix devshell/flake in favor of mise for toolchain management. Tasks stay in the Makefile, which now calls treefmt/gofumpt directly instead of nix fmt / nix flake check.

What changed

  • mise.toml (+ mise.lock) — provisions the toolchain the flake's devshell used to: Go, gopls, golangci-lint, gofumpt, treefmt, actionlint, zizmor, plus mdformat (via uv/pipx) and mdsh (via cargo). mise install sets it all up. The lockfile pins exact versions + checksums for all platforms (incl. the Linux CI runners) for reproducible installs.
  • treefmt.toml — replaces the treefmt config that was inlined in flake.nix (gofmt, mdsh, mdformat, actionlint, zizmor). nixfmt dropped since there are no more .nix files. mdsh runs before mdformat (priority) so the README stays in sync.
  • Makefilemake fmttreefmt; make checktreefmt --fail-on-change (treefmt now runs mdsh + mdformat, so it also validates README.md, replacing the old mdsh --frozen guard); codegen uses the mise-provided gofumpt.
  • CI (.github/workflows/ci.yaml) — replaces the Nix install/cache steps with jdx/mise-action; runs make check and make test through mise.
  • dependabot — removed the nix ecosystem.
  • docsAGENTS.md / RELEASING.md now reference mise instead of nix.
  • Deleted flake.nix and flake.lock.

Verification

Validated on a fresh clone of this branch (no caches, natural mtimes — i.e. true CI conditions) with the pinned toolchain (go 1.26.3):

  • mise install → all tools provision.
  • make checkformatted 44 files (0 changed), exit 0, no drift.
  • make testok github.com/coder/acp-go-sdk, all examples build.
  • actionlint + zizmor → clean on the rewritten workflow.

🤖 Generated with Claude Code

ThomasK33 and others added 2 commits June 1, 2026 15:24
Drop the Nix devshell/flake in favor of mise for toolchain management.
Tasks stay in the Makefile, which now calls treefmt/gofumpt directly
instead of `nix fmt` / `nix flake check`.

- Add mise.toml (+ mise.lock) provisioning Go, gopls, golangci-lint,
  gofumpt, treefmt, actionlint, zizmor, mdformat (uv) and mdsh (cargo).
- Add treefmt.toml replacing the treefmt config previously inlined in
  flake.nix (gofmt, mdsh, mdformat, actionlint, zizmor; nixfmt dropped).
- Makefile: `fmt` -> treefmt, `check` -> treefmt --fail-on-change.
- CI: swap the Nix setup/cache steps for jdx/mise-action.
- Remove the nix dependabot ecosystem; update AGENTS.md/RELEASING.md.
- Delete flake.nix and flake.lock.

Change-Id: I4b371372980065cfe309e23d2c9366df76d4717f
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Thomas Kosiewski <tk@coder.com>
treefmt runs both mdsh and mdformat over README.md. The cargo-built mdsh
0.7.0 strips the blank line after an mdsh directive comment, while mdformat
re-adds it. Each rewrites the file, so the net content is unchanged (README
is a fixpoint of the pair) but treefmt's --fail-on-change trips on the
intermediate churn, failing CI.

Format in place with treefmt and let 'git diff --exit-code' verify there is
no net drift, which still catches genuine formatting/sync regressions while
tolerating the harmless oscillation.
@ThomasK33 ThomasK33 merged commit 3091984 into main Jun 1, 2026
1 check passed
@ThomasK33 ThomasK33 deleted the refactor/replace-nix-with-mise branch June 1, 2026 13:45
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