Skip to content

Commit

Permalink
add instructions for cachix.
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinafyi authored Sep 11, 2023
1 parent 4d9a0db commit fd42251
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,25 @@ Nix is powerful but the documentation is of mixed quality.
introduces some other commands.
Otherwise, it will be useful to search as far as you can.

### bonus: binary cache

The GitHub Actions workflow maintains a custom binary cache for this repository.
Using this cache, you can install these Nix packages while avoiding the need to run any compilations yourself.
This can save a fair bit of bandwidth and time.

The cache is served at [pac-nix.cachix.org](https://pac-nix.cachix.org/) and can be used like so:
```bash
# install the cachix tool
nix-env -iA cachix -f https://cachix.org/api/v1/install
# configure nix to use cache. you may need to trust your username
cachix use pac-nix
```
Then, `nix-env` should draw from this cache in addition to the usual Nixpkgs cache. This will be visible in its output:
```
copying path '/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-ocaml4.14.1-bap-2.5.0' from 'https://cache.nixos.org'...
copying path '/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-bap-aslp-2.5.0' from 'https://pac-nix.cachix.org'...
```

## local sources / customisation

It is often useful to build a package from
Expand Down

0 comments on commit fd42251

Please sign in to comment.