fix: use extra-substituters to avoid untrusted user warnings - #1351
Conversation
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughUpdated Nix cache configuration by removing the standard Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Mesa DescriptionTL;DRReplace What changed?
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Pull request overview
Updates Home Manager’s nix.settings to avoid “untrusted user” warnings by switching from restricted cache settings (substituters, trusted-public-keys, use-xdg-base-directories) to their non-restricted extra-* counterparts.
Changes:
- Replace
substituters/trusted-public-keyswithextra-substituters/extra-trusted-public-keys. - Remove
use-xdg-base-directoriesto avoid restricted-setting warnings for untrusted users. - Rely on Nix defaults for
cache.nixos.orginstead of redundantly specifying it.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" | ||
| extra-trusted-public-keys = [ | ||
| "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | ||
| "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" |
There was a problem hiding this comment.
The Garnix public key entry uses the identifier cache.garnix.io (no -1 suffix), while the other substituter keys follow the common <host>-1: pattern. If Garnix signs with a different key name (e.g. cache.garnix.io-1), Nix will treat signatures as untrusted and the cache will be ignored. Please verify the expected key name from Garnix and update the prefix so it matches the signing key identifier.
| "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" | |
| "cache.garnix.io-1:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" |
There was a problem hiding this comment.
Code Review
This pull request updates the Nix configuration by transitioning from substituters and trusted-public-keys to extra-substituters and extra-trusted-public-keys, while also removing default NixOS entries and the use-xdg-base-directories setting. A review comment suggests reordering the public keys to match the order of the substituter URLs to improve maintainability and simplify verification.
| ]; | ||
| trusted-public-keys = [ | ||
| "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" | ||
| extra-trusted-public-keys = [ |
There was a problem hiding this comment.
The order of keys in extra-trusted-public-keys does not match the order of URLs in extra-substituters. While this doesn't affect functionality, maintaining a consistent order (e.g., alphabetical or matching the substituters list) makes it significantly easier to verify that each cache has its corresponding public key and improves long-term maintainability.
* feat: add paperclip service (#1342) * feat: add paperclip service - Systemd service on kyber: runs `paperclipai run` via bun, depends on docker-postgres - Config via builtins.toJSON: external postgres on kyber, embedded on macOS - Setup script creates paperclip database on docker-postgres - Makefile target: `make systemctl-paperclip` * fix: add shellcheck disable and shell test coverage for paperclip * fix: correct shellcheck disable directive syntax * refactor: use config.template.json pattern for paperclip * refactor: rename setup.sh to hydrate.sh for paperclip * test: add auto-switch hook tests and update coverage spec * fix: remove EnvironmentFile from paperclip service (#1344) * fix: paperclip authenticated mode and required config fields (#1345) * fix: remove EnvironmentFile from paperclip service * fix: use authenticated mode on kyber, add required meta/logging fields * fix: add allowedHostnames for paperclip.shunkakinoki.com * fix: format config template json * fix: use trust auth for docker-postgres (#1346) POSTGRES_HOST_AUTH_METHOD=trust removes password auth for all connections. The password kept going out of sync after crash recovery, causing paperclip and other services to fail with 'password authentication failed'. Safe since postgres is only reachable from the host. * fix: use k8s postgres via DATABASE_URL, remove docker-postgres dep, add authenticated mode (#1347) * fix: use bun runtime for paperclip (pino-http node crash), k8s postgres via DATABASE_URL (#1348) * fix: use nix-profile bun path for paperclip service (#1350) * fix: add caret prefix to paperclipai dependency (#1349) * fix: use extra-substituters to avoid untrusted user warnings (#1351) * fix: run paperclip from cloned repo via pnpm dev:once (#1352) * fix: run paperclip from cloned repo via pnpm dev:once The global bun install flattens pino@10 + pino-http@10.5 together, but pino-http needs pino@9. The repo lockfile resolves this correctly with nested dependencies. Running from the repo avoids the crash. * fix: use bun run server/src/index.ts instead of pnpm dev:once * fix: pin pino@9.14.0 override, run paperclipai from dotfiles node_modules The bun flat hoisting was resolving pino@10 which is incompatible with pino-http@10.5. Pinning pino to 9.14.0 via overrides matches the paperclip repo's lockfile resolution and fixes the crash. * fix: use global bun paperclipai with pino override (#1353) * fix: use global ~/.bun/bin/paperclipai with pino override Propagate overrides from dotfiles package.json to ~/.bun/install/global/ so the global binary resolves pino@9.14.0 correctly. * test: add tests for npm-globals dependency overrides * fix: resolve GitHub Actions failures and code review issues - Fix non-portable \s regex to [[:space:]] in auto-switch.sh (shfmt compat) - Add jq dependency check alongside cswap - Use printf instead of echo for safer output - Fix claude-swap version from >=1.1.5 (non-existent) to >=0.7.1 - Add auto-switch.sh to Nix deployment config (default.nix) - Sort covered_scripts list alphabetically in coverage_spec.sh https://claude.ai/code/session_012GyQBesQGF1asTfKebWyLM --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
substituters/trusted-public-keyswithextra-substituters/extra-trusted-public-keysin Home Manager nix settingsuse-xdg-base-directories(restricted setting not allowed for untrusted users)cache.nixos.orgentry (already in default substituters)Fixes the repeated "ignoring untrusted substituter" and "ignoring the client-specified setting" warnings during
make build && make switch.The
extra-prefixed settings are not restricted, so they work for non-trusted users in standalone Home Manager setups (kyber).Summary by cubic
Switch Home Manager Nix config to
extra-substituters/extra-trusted-public-keysand remove restricted options to stop “untrusted substituter” and “ignoring the client-specified setting” warnings for non‑trusted users during build/switch. Removeduse-xdg-base-directories(restricted) and the redundantcache.nixos.orgentry since it’s included by default.Written for commit 2536bdd. Summary will update on new commits.