A flake app that can push all buildable flake outputs (determined via devour-flake) to cachix.
This is a flake-parts module that you can import in your flake.nix
and use:
{
imports = [
inputs.cachix-push.flakeModule
];
perSystem = { ... }: {
cachix-push = {
cacheName = "mycache";
};
};
}
Then, run:
nix run .#cachix-push
- If you use Apple silicon, but want to push the Intel binaries to cache, run:
nix run .#cachix-push -- --option system x86_64-darwin
.
While pushing to a Nix cache is best done automatically by CI, there are situations where you want to manually do this. Notably, Github Actions CI doesn't support ARM macOS yet - so to provide a macOS cache to your team, you need to manually push to cachix (or use a different CI service).