···2424attic use foo
2525```
26262727+This adds the binary cache to your `~/.config/nix/nix.conf` and configures the credentials required to access it.
2828+2929+If you wish to configure Nix manually, you can view the binary cache endpoint and the cache public key:
3030+3131+```console
3232+$ attic cache info foo
3333+ Public: true
3434+ Public Key: foo:WcnO6s4aVkB6CKRaPPpKvHLZykWXASV6c+/Ssg8uQEY=
3535+Binary Cache Endpoint: https://attic.domain.tld/foo
3636+ Store Directory: /nix/store
3737+ Priority: 41
3838+ Upstream Cache Keys: ["cache.nixos.org-1"]
3939+ Retention Period: Global Default
4040+```
4141+4242+On NixOS, you can configure the cache declaratively in your system configuration with the above information:
4343+4444+```nix
4545+{
4646+ nix.settings = {
4747+ substituters = [
4848+ "https://attic.domain.tld/foo"
4949+ ];
5050+ trusted-public-keys = [
5151+ "foo:WcnO6s4aVkB6CKRaPPpKvHLZykWXASV6c+/Ssg8uQEY="
5252+ ];
5353+ };
5454+}
5555+```
5656+2757## Disabling a cache
28582959To configure Nix to no longer use a cache, remove the corresponding entries from the list of `substituters` and `trusted-public-keys` in `~/.config/nix/nix.conf`