Skip to content

fix(M4Pro): add corporate SSL certificate config - #5

Merged
lemtoc merged 2 commits into
mainfrom
fix/issue/4
Feb 27, 2026
Merged

fix(M4Pro): add corporate SSL certificate config#5
lemtoc merged 2 commits into
mainfrom
fix/issue/4

Conversation

@lemtoc

@lemtoc lemtoc commented Feb 27, 2026

Copy link
Copy Markdown
Owner

Issue

fixes #4

Changes

  • Add host-specific SSL certificate configuration to hosts/M4Pro/default.nix for corporate proxy
    • DENO_CERT — deno が JSR パッケージを取得する際の SSL 検証に使用
    • NODE_EXTRA_CA_CERTS — Node.js の SSL 検証に使用
    • git http.sslCAInfo — git の HTTPS 通信に使用
  • 証明書パスを ~/.local/share/ca-certificates/corp.pem に統一し、customCert 変数で一元管理

Verification

  • No lint/type errors
  • No breaking changes introduced
  • Changeset file created (if needed for version bump)

Additional Notes

会社 Mac の SSL インスペクションにより、deno が JSR (jsr.io) へアクセスする際に invalid peer certificate: UnknownIssuer エラーが発生し、zeno.zsh のソケットサーバー起動に失敗していた。スペースキー・エンターキーが zeno の widget にバインドされているため、シェルが操作不能になる問題が起きていた。

@changeset-bot

changeset-bot Bot commented Feb 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8f4a55a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@lemtoc lemtoc self-assigned this Feb 27, 2026
@lemtoc

lemtoc commented Feb 27, 2026

Copy link
Copy Markdown
Owner Author

CI 失敗の原因

programs.git.settings.http.sslCAInfo で証明書パスを設定すると、home-manager が生成する .config/git/config にハードコードされる。

CI (benchmark-pr) では setup-bench-env で M4Pro の home-manager 生成物をシンボリンクしているため、ランナー上にも http.sslCAInfo が適用される。しかしランナーに証明書ファイルが存在しないため git fetch が失敗する:

fatal: unable to access 'https://github.com/mfyuu/dotfiles.git/':
error setting certificate verify locations:
CAfile: /Users/mfyuu/.local/share/ca-certificates/corp.pem CApath: none

対応

programs.git.settings.http.sslCAInfoGIT_SSL_CAINFO 環境変数に変更。
home.sessionVariables はシェルセッション変数として設定されるだけで git config ファイルには書き込まれないため、CI に影響しない。

- programs.git.settings.http.sslCAInfo writes to .config/git/config
- CI symlinks home-manager output, so sslCAInfo leaks into the runner
- runner has no cert file at that path, causing git fetch to fail
- use GIT_SSL_CAINFO env var instead (not written to git config)

@github-actions github-actions Bot 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.

Zsh Startup Time

Details
Benchmark suite Current: 8f4a55a Previous: c0ae1f8 Ratio
zsh -i -c exit 48.5 ms (12.95 ms) 45.51 ms (9.24 ms) 1.07

This comment was automatically generated by workflow using github-action-benchmark.

@lemtoc
lemtoc merged commit 4e6f0f7 into main Feb 27, 2026
1 check passed
@lemtoc
lemtoc deleted the fix/issue/4 branch February 27, 2026 02:47
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.

fix(M4Pro): corporate SSL certificate not configured for deno/node/git

1 participant