Skip to content

build(nix): move to nixpkgs, nix-darwin and home-manager 26.05 - #219

Merged
furedea merged 3 commits into
mainfrom
build/nix-26.05
Oct 18, 2026
Merged

furedea merged 3 commits into
mainfrom
build/nix-26.05

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Moves nixpkgs, nix-darwin, and home-manager from 25.11 to 26.05 and drops the nix-homebrew pin added in #217. nix-darwin 26.05 runs brew bundle cleanup --force-cleanup instead of the brew bundle --cleanup flag that Homebrew 7 removed.

26.05 move (4cf2f9a)

  • flake.nix: inputs now point at nixpkgs-26.05-darwin, nix-darwin-26.05, and release-26.05. The nix-homebrew pin and its 3-line comment are removed.
  • flake.lock: only nixpkgs, nix-darwin, home-manager, and nix-homebrew were updated. nixpkgs-unstable and hermes-agent are unchanged.
  • nix/home/default.nix: nodePackages."@antfu/ni" → ni (nodePackages was removed in 26.05), and nixfmt-rfc-style → nixfmt. programs.neovim.withRuby and withPython3 are now set to false explicitly, which adopts the new defaults and silences the warning.
  • .github/workflows/ci.yml: nix run nixpkgs#nixfmt-rfc-style → nixpkgs#nixfmt.
  • README.md: the first-install darwin-rebuild command now uses nix-darwin-26.05.
  • home.stateVersion and system.stateVersion are unchanged.

moshi-hook 0.3.21 → 0.4.31 (8acb48b)

Building with 26.05 changes stdenv, so the moshi-hook derivation has to fetch its source again. The CDN no longer serves v0.3.21 or any older release (https://cdn.getmoshi.app/hook/v0.3.21/moshi-hook_Darwin_arm64.tar.gz returns 404). The main build only works on machines where the old output is still in the store, so a clean machine or CI would fail too.

  • Updated to v0.4.31, the version reported by hook/latest/version.txt. The URL scheme is unchanged, and the sha256 matches the upstream checksums.txt.
  • The configuration uses install --target claude,codex, serve, and status --json (.paired, .secretStore). All three still work the same in 0.4.31.
  • nix/checks.nix and tests/agents/agent_hook.bats pin the version string, so they now expect 0.4.31.

nvim sideloadInitLua (9a1cef6)

Home Manager 26.05 writes the generated provider settings (vim.g.loaded_*_provider = 0) to ~/.config/nvim/init.lua. That conflicts with the out-of-store ~/.config/nvim link to the dotfiles tree, and the build failed with Error installing file '.config/nvim/init.lua' outside $HOME. Setting programs.neovim.sideloadInitLua = true loads that content through the nvim wrapper instead, and the dotfiles tree keeps ownership of init.lua.

Verification

Command Result
nix eval drvPath of darwinConfigurations.{mbp,mba}.system and homeConfigurations.kaito.activationPackage Pass, with no evaluation warnings or errors
nix build .#darwinConfigurations.mbp.system .#homeConfigurations.kaito.activationPackage Pass
nix build .#checks.aarch64-darwin.{home-configuration,host-configuration} Pass
bats tests/agents/agent_hook.bats tests/agents/codex/codex_notification.bats tests/herdr/herdr_command.bats tests/hermes/hermes_secretary.bats tests/nix/configuration.bats tests/terminal-browser/terminal_browser.bats Pass (13/13)
uv run --frozen pytest tests Pass (1564 passed)
lefthook pre-commit / commit-msg Pass

After merge, darwin-rebuild switch and home-manager switch still need to be run on the host.

Closes #218

🤖 Generated with Claude Code

furedea and others added 3 commits October 18, 2026 20:55
Unpin nix-homebrew now that nix-darwin 26.05 no longer passes the
`brew bundle --cleanup` flag Homebrew 7 removed. Replace the removed
nodePackages."@antfu/ni" with ni, rename nixfmt-rfc-style to nixfmt, and
adopt the new neovim provider defaults explicitly.

Refs #218

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The CDN no longer serves v0.3.21 (or any older release), so rebuilding the
fixed-output source fails with 404. 0.4.31 keeps the `install --target`,
`serve`, and `status --json` interface the configuration relies on.

Refs #218

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Home Manager 26.05 writes provider settings to ~/.config/nvim/init.lua, which
collides with the out-of-store ~/.config/nvim link to the dotfiles tree.
Load that content through the wrapper instead.

Refs #218

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@furedea
furedea merged commit 3f70dc7 into main Oct 18, 2026
13 checks passed
@furedea
furedea deleted the build/nix-26.05 branch October 18, 2026 12:11
furedea added a commit that referenced this pull request Oct 18, 2026
## Summary

`cdn.getmoshi.app` deletes old moshi-hook releases, so a stale pin
breaks with 404 whenever a nixpkgs change forces a rebuild (as in #219).
This adds a daily workflow that keeps `nix/packages/moshi_hook.nix` on
the latest release.

Closes #220

## Commits

- `feat(moshi)`: `scripts/moshi/update_moshi_hook.sh` reads
`latest/version.txt` (must be `vX.Y.Z`), takes the
`moshi-hook_Darwin_arm64.tar.gz` hash from the release's
`checksums.txt`, converts it to SRI, and rewrites only `version` and
`hash`. Exits 3 when the pin is current. The CDN base URL is replaceable
via `MOSHI_CDN_URL`; Bats tests serve fixtures through `file://`.
- `test(moshi)`: `moshi-pinned` / `moshi-managed-runtime` in
`nix/checks.nix` and the two greps in `tests/agents/agent_hook.bats`
read the version from `moshi_hook.nix` instead of hard-coding 0.4.31,
still asserting `/nix/store/...-moshi-hook-<version>/bin/moshi-hook`.
- `ci(moshi)`: `.github/workflows/update_moshi_hook.yml` (daily
`schedule` + `workflow_dispatch`) pushes
`chore/update-moshi-hook-<version>` and opens a PR unless one is already
open, then runs `gh workflow run ci.yml` because PRs created with
`GITHUB_TOKEN` do not trigger `pull_request` runs. `ci.yml` gains
`workflow_dispatch` and runs the new Bats tests.

## Verification

- `bats tests/moshi/update_moshi_hook.bats tests/moshi/lifecycle.bats
tests/agents/agent_hook.bats tests/agents/codex/codex_notification.bats
tests/herdr/herdr_command.bats tests/hermes/hermes_secretary.bats
tests/nix/configuration.bats
tests/terminal-browser/terminal_browser.bats`: 18/18 pass
- `uv run --frozen pytest tests`: 1564 passed
- `nix build .#checks.aarch64-darwin.home-configuration
.#checks.aarch64-darwin.host-configuration`: pass
- Real CDN: 0.4.31 yields "no update" (exit 3); a copy pinned to 0.3.21
is rewritten to exactly the current `moshi_hook.nix`
- `actionlint`: pass; `zizmor` 1.31.0: no findings

## Required repository setting

Settings → Actions → General → **Allow GitHub Actions to create and
approve pull requests** must be enabled, or the workflow cannot open
PRs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

nixpkgs / nix-darwin / home-manager を 26.05 に移行する

1 participant