Skip to content

fix(homebrew): manage trusted formulae - #11

Merged
furedea merged 2 commits into
mainfrom
fix/update-nix-homebrew
Aug 1, 2026
Merged

furedea merged 2 commits into
mainfrom
fix/update-nix-homebrew

Conversation

@furedea

@furedea furedea commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • pin the Homebrew source used by nix-homebrew to a compatible commit
  • generate a formula-scoped trust store for winebarrel/kasa/kasa
  • install the trust store before Homebrew Bundle for both XDG and fallback config paths

Verification

  • built darwinConfigurations.mba.system from the committed Git revision
  • verified Homebrew reads only winebarrel/kasa/kasa from the generated trust store
  • verified trust store installation precedes Homebrew Bundle in the activation script

Copilot AI review requested due to automatic review settings August 1, 2026 02:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins the Homebrew brew source used by nix-homebrew and adds a generated, formula-scoped Homebrew trust store so Homebrew can load winebarrel/kasa/kasa during activation while keeping trust narrowly scoped.

Changes:

  • Pins brew-src to a specific Homebrew/brew commit and wires it to nix-homebrew via follows.
  • Generates trust.json containing trustedformulae = ["winebarrel/kasa/kasa"] and installs it to both ~/.homebrew and ~/.config/homebrew before running Homebrew Bundle.
  • Reuses a single kasaFormula constant for both the trust store and the homebrew.brews entry.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
nix/darwin/default.nix Generates and installs a scoped Homebrew trust store pre-activation; reuses a shared formula constant in Homebrew Bundle config.
flake.nix Adds a pinned brew-src input and makes nix-homebrew follow it.
flake.lock Updates lock entries to reflect the pinned brew-src revision and updated nix-homebrew input wiring.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@furedea
furedea merged commit 80d4593 into main Aug 1, 2026
8 checks passed
@furedea
furedea deleted the fix/update-nix-homebrew branch August 1, 2026 02:48
furedea added a commit that referenced this pull request Sep 15, 2026
## Summary

`darwin-rebuild switch` aborts right after #107 with:

```
Tapping jundot/omlx
Error: Refusing to load formula jundot/omlx/omlx from untrusted tap jundot/omlx.
```

Homebrew refuses to load formulae from third-party taps until they are
trusted, and nix-darwin
25.11 exposes no option for `brew trust`. Trusting it by hand leaves the
trust store as manual
state that a fresh machine would not reproduce.

- restore the generated trust store from #11, which was dropped along
with the moshi formula
- scope the trust to the single formula rather than the whole tap, so
only that formula is
  authorized to run Ruby (the principle ADR-0005 recorded)
- declare both spellings, because Homebrew records the clone URL form
for taps with a custom
  clone target
- install the trust store into both `~/.homebrew` and
`~/.config/homebrew` before Homebrew
Bundle runs, since Bundle runs without `XDG_CONFIG_HOME` while
interactive shells set it
- replace the duplicated tap and formula literals with `let` bindings

Generated trust store:

```json
{"trustedformulae":["jundot/omlx/omlx","https://github.com/jundot/omlx/omlx"]}
```

## Verification

- `nixfmt --check`, `statix check`, `deadnix --fail` pass on
`nix/darwin/default.nix`
- `nix build --no-link .#darwinConfigurations.mbp.system` succeeds
- confirmed the generated `homebrew-trust.json` content and its
`install` invocation in the
  rendered `preActivation` script

## Notes

Which spelling Homebrew matches against was not verified empirically, so
both are declared.

This trust store replaces the file currently on disk, dropping four
stale entries
(`antoniorodr/memo/memo`, `rjyo/moshi/moshi-hook`,
`steipete/tap/remindctl`,
`winebarrel/kasa/kasa`) and the tap-wide trust entry. None of those
formulae remain in
`homebrew.brews`, so `cleanup = "uninstall"` has already removed them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
furedea added a commit that referenced this pull request Oct 24, 2026
## 概要

agent-config を c6aacdf に更新し,`DEVIN_PERMISSION_MODE` を
`nix/darwin/default.nix` のリテラルではなく
`agent-config.lib.agentEnvironment`(agent-config PR
#15)から読むようにします.サーバー側の bootstrap とホストが同じ値を共有します.

Refs furedea/agent-config#8(計画:
furedea/agent-config#8 (comment)
の devin-env 行)

## 変更

- `flake.lock`: `agent-config` を dd59634 から c6aacdf へ更新(agent-config PR
#6, #11, #12, #13, #15, #16, #17 を取り込む)
- `flake.nix`: darwin の `specialArgs` に `agent-config` を追加
- `nix/darwin/default.nix`: `inherit (agent-config.lib.agentEnvironment)
DEVIN_PERMISSION_MODE;`
- `nix/checks.nix` は変更なし(`devin-smart-permission-mode` は通る)

## 検証

- `nix flake check`,`nix build
.#checks.aarch64-darwin.{host,home}-configuration`: 成功
- `darwin-rebuild build --flake .#mbp`: 成功(switch はしていない)
- `deadnix --fail`,`nixfmt --check`,`pytest -m 'not integration'`(121
件): 成功

## 描画された agent ファイルの差分(現行世代 → 新世代)

- `.claude/hooks/defaults/`(`dprint.json`,`prettier.json`)が新規追加
- hooks/lib に
`javascript_runner.py`,`shell_input.py`,`shell_paths.py`,`shell_words.py`
が追加.`guard_file.py`,`check_selection.py`,`formatter_policy.py`,`git_safety.py`,`lint_engine.py`,`provider_adapter.py`,`shell_syntax.py`,`rules/protected_paths.json`
が変更
- Claude の `settings.json` と Codex の `config.toml`: 追加された hook ファイルの
read/Edit 保護と,sandbox の `~/.cache/dprint` 書き込み許可が増えただけ(削除なし)
- スキル本文:
`git-workflow/references/branches.md`,`herdr-delegation/SKILL.md`(Claude・Codex
両方)

差分はすべて取り込んだ agent-config の変更に由来します.

## レビュー

変更が 3 ファイル 8 行で,レビューはこの PR 上で行います.

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

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

2 participants