···2424attic use foo
2525```
26262727-On NixOS you can add the cache declaratively in your `configuration.nix`:
2727+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
2840```
2929-nix.settings = {
3030- substituters = [
3131- "BINARY_CACHE_ENDPOINT"
3232- ];
3333- trusted-public-keys = [
3434- "CACHE_PUBLIC_KEY"
3535- ];
3636-};
3737-```
4141+4242+On NixOS, you can configure the cache declaratively in your system configuration with the above information:
38433939-To view the binary cache endpoint and cache public key for `foo`:
4040-```
4141-attic cache info foo
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+}
4255```
43564457## Disabling a cache