refactor: replace nix and mise-tasks with mise bootstrap - #86
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the nix +
mise run setupbootstrap withmise 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:
a85b8efdeleted every file inmise-tasks/whilesetup.shand.cirrus.ymlstill calledmise run setupandmise run test-emacs.9f5850caddedmise-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
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}.tomlmise-tasks/(10 task files)mise.tomlcarries onlyrender-workflows/check-workflowssetup.sh(130 lines, installs nix).cirrus.yml.github/workflows/{validate,bootstrap}.pkl→ generated.ymlNotable decisions
config/mise/is named that deliberately. mise auto-discoversmise/,.mise/conf.d/, and.config/mise/conf.d/as project config. Any of those names would meancd-ing into this repo loads the machine config a second time — including[bootstrap.macos.defaults].config/mise/matches no discovery rule, so the~/.config/misesymlink is the only path by which it loads.Tool-dependent work moved to
post-tools.toolsis stage 15 of 17, and three things were running before it: the_misecompletion, the gpg-agent restart, andgpg-agent.conf'smise which pinentry-cursesinterpolation. The oldpost-dotfileshook papered over this with|| true, which meant it silently did nothing on exactly the fresh-machine case it existed for.CI is two tiers.
validateruns per-PR and installs nothing — config loads, every stage resolves under--dry-run, generated YAML matches its source.bootstrapruns weekly and on demand: a realsetup.shon a clean macOS runner, artifact assertions, idempotency re-run.Workflow YAML is generated and must not be hand-edited.
mise run render-workflowsregenerates it;check-workflowsre-renders and diffs, so drift fails CI.Verified locally
mise bootstrap --yes: exit 0, every stage applied; second run converges with no changes._miseloadable by a realcompinit, gpg-agent reachable (GETINFO version→ 2.5.21) with a resolvedpinentry-programpath..yml.Migrating an existing machine
~/.config/miseis now a directory symlink rather than a per-file one.setup.shmoves a pre-existing real directory aside automatically, but the globalmise.locklives inside it — check it landed atconfig/mise/mise.lockbefore deleting the backup.Not covered
validaterun is where runner-environment assumptions surface — most likelymise trustor a pre-existing~/.zshrconmacos-latest.emacs-overlay.ymlis deleted along with the flake. It targeted thebuild-emacs-overlaybranch, so confirm that pipeline is genuinely retired.emacs/emacs-env/is kept — still loaded bymain.el:822.