Skip to content

refactor: replace nix and mise-tasks with mise bootstrap - #86

Merged
djgoku merged 2 commits into
mainfrom
updates-2026-08-22
Aug 23, 2026
Merged

refactor: replace nix and mise-tasks with mise bootstrap#86
djgoku merged 2 commits into
mainfrom
updates-2026-08-22

Conversation

@djgoku

@djgoku djgoku commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the nix + mise run setup bootstrap with mise bootstrap, splits machine config from project config, and moves CI from Cirrus to GitHub Actions with Pkl-generated workflows.

Also carries chore: Update to latest elpaca 0.12 init.el, which is unrelated and left as its own commit.

Why this is one commit, not three

The two earlier commits on this branch each left the tree broken, so they're squashed:

  • a85b8ef deleted every file in mise-tasks/ while setup.sh and .cirrus.yml still called mise run setup and mise run test-emacs.
  • 9f5850c added mise-conf.d/10-bootstrap.toml — but mise only auto-loads ~/.config/mise/conf.d/*.toml, so nothing in that file ever loaded. It was a no-op commit, and neither file it touched survives.

Layout

Before After
mise.toml (machine and project config) config/mise/config.toml (machine) + mise.toml (project tasks)
mise-conf.d/10-bootstrap.toml (never loaded) config/mise/conf.d/{10-repos,20-files,30-macos,90-hooks}.toml
mise-tasks/ (10 task files) gone; mise.toml carries only render-workflows / check-workflows
setup.sh (130 lines, installs nix) 40 lines: clone, install mise, symlink, hand off
.cirrus.yml .github/workflows/{validate,bootstrap}.pkl → generated .yml

Notable decisions

config/mise/ is named that deliberately. mise auto-discovers mise/, .mise/conf.d/, and .config/mise/conf.d/ as project config. Any of those names would mean cd-ing into this repo loads the machine config a second time — including [bootstrap.macos.defaults]. config/mise/ matches no discovery rule, so the ~/.config/mise symlink is the only path by which it loads.

Tool-dependent work moved to post-tools. tools is stage 15 of 17, and three things were running before it: the _mise completion, the gpg-agent restart, and gpg-agent.conf's mise which pinentry-curses interpolation. The old post-dotfiles hook papered over this with || true, which meant it silently did nothing on exactly the fresh-machine case it existed for.

CI is two tiers. validate runs per-PR and installs nothing — config loads, every stage resolves under --dry-run, generated YAML matches its source. bootstrap runs weekly and on demand: a real setup.sh on a clean macOS runner, artifact assertions, idempotency re-run.

Workflow YAML is generated and must not be hand-edited. mise run render-workflows regenerates it; check-workflows re-renders and diffs, so drift fails CI.

Verified locally

  • Full mise bootstrap --yes: exit 0, every stage applied; second run converges with no changes.
  • Artifacts: symlinks, 64 tree-sitter grammars, fzf-tab cloned, _mise loadable by a real compinit, gpg-agent reachable (GETINFO version → 2.5.21) with a resolved pinentry-program path.
  • Pkl render is deterministic; drift check passes in sync and correctly fails on a hand-edited .yml.

Migrating an existing machine

~/.config/mise is now a directory symlink rather than a per-file one. setup.sh moves a pre-existing real directory aside automatically, but the global mise.lock lives inside it — check it landed at config/mise/mise.lock before deleting the backup.

Not covered

  • CI has never run on GitHub. The first validate run is where runner-environment assumptions surface — most likely mise trust or a pre-existing ~/.zshrc on macos-latest.
  • emacs-overlay.yml is deleted along with the flake. It targeted the build-emacs-overlay branch, so confirm that pipeline is genuinely retired.
  • emacs/emacs-env/ is kept — still loaded by main.el:822.

djgoku added 2 commits August 22, 2026 17:31
mise is the single entry point. The two configs have distinct jobs: machine
config lives in config/mise/, symlinked to ~/.config/mise, while the root
mise.toml is project config for this repo alone -- its tasks and the tools
they need.

The directory is named config/mise/ rather than mise/ or .config/mise/
because mise auto-discovers all of those as project config, which would
load the [bootstrap] stanzas -- macos.defaults included -- on any cd into
this repo. config/mise/ matches no discovery rule, so the symlink is the
only path by which it loads.

Tool-dependent work moved to the post-tools hook. Tools install at stage 15
of 17, so rendering gpg-agent.conf and restarting gpg-agent both ran far too
early before: the old post-dotfiles hook needed a `|| true` guard, which
meant it silently did nothing on exactly the fresh-machine case it existed
for. gpg-agent.conf.tmpl now carries a fallback so the dotfiles stage cannot
hard-fail, and post-tools re-renders it with the resolved path.

- setup.sh reduced to clone, install mise, symlink ~/.config/mise, hand off
- CI moves from Cirrus to GitHub Actions in two tiers: validate (per-PR,
  installs nothing -- config loads, every stage resolves under --dry-run,
  generated YAML matches its source) and bootstrap (weekly and on demand, a
  real setup.sh run with artifact assertions and an idempotency re-run)
- workflow YAML is generated from Pkl via com.github.actions, with
  render-workflows/check-workflows as mise tasks; check-workflows re-renders
  and diffs, so a hand-edited .yml fails CI
- restore the tree-sitter-module clone and grammar build, guarded on dist/
- declare each parent directory explicitly: bootstrap.files creates no
  parents and does not mkdir -p
- Terminal.plist applies with mode=copy, since cfprefsd rewrites it in place
- drop texlive, enchant, MiseEmacs.app, the emacs-overlay flake and its
  workflow, and the vterm block that depended on nix's MISE_VTERM_PATH
- .gitignore: drop nix entries, add the .eld suffixes that never matched
@djgoku
djgoku merged commit dd564b0 into main Aug 23, 2026
1 check passed
@djgoku
djgoku deleted the updates-2026-08-22 branch August 23, 2026 01:23
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.

1 participant