Skip to content

Commit 27b7d92

Browse files
committed
feat: add cachix binary cache for firefly-toolbox
Configure nixConfig in flake.nix to automatically use the firefly-toolbox cachix cache for downstream consumers. Accept flake config in .envrc for local dev. Document cache push command.
1 parent 294ac67 commit 27b7d92

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ if [ ! -f .devenv-root ]; then
77
fi
88

99
watch_file .devenv-root
10-
use flake . --override-input devenv-root "file+file://$PWD/.devenv-root" --impure
10+
use flake . --override-input devenv-root "file+file://$PWD/.devenv-root" --impure --accept-flake-config

AGENTS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,20 @@ Once you've identified that a newer version exists:
316316
3. Update `_meta.default` to the new version.
317317
4. Test the build and verify the binary.
318318
319+
## Binary Cache (Cachix)
320+
321+
Toolbox packages are cached on [Cachix](https://app.cachix.org/cache/firefly-toolbox) (`firefly-toolbox`). The flake's `nixConfig` automatically configures downstream consumers to use this cache.
322+
323+
### Pushing all packages to the cache
324+
325+
```bash
326+
nix build --no-link --print-out-paths --impure --expr '
327+
builtins.attrValues (builtins.getFlake (toString ./.)).packages.aarch64-darwin
328+
' | cachix push firefly-toolbox
329+
```
330+
331+
Replace `aarch64-darwin` with the target system (e.g., `x86_64-linux`) as needed.
332+
319333
## Verification Checklist
320334

321335
After making changes:

flake.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
description = "Toolbox: self-contained package registry for turnkey";
33

4+
nixConfig = {
5+
extra-substituters = [ "https://firefly-toolbox.cachix.org" ];
6+
extra-trusted-public-keys = [ "firefly-toolbox.cachix.org-1:4RgCoc0+CS7QhRarG109VmWlnlYi+rQ5JYrCsRP5aK8=" ];
7+
};
8+
49
inputs = {
510
nix-pins.url = "github:firefly-engineering/nix-pins";
611
nixpkgs.follows = "nix-pins/nixpkgs";

0 commit comments

Comments
 (0)