A fork of attic a self-hostable Nix Binary Cache server
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #278 from gytic/doc-cache

docs: usage instructions for binary cache with NixOS (declaratively)

authored by

Zhaofeng Li and committed by
GitHub
2524dd1c c1cfee9b

+30
+30
book/src/user-guide/README.md
··· 24 24 attic use foo 25 25 ``` 26 26 27 + This adds the binary cache to your `~/.config/nix/nix.conf` and configures the credentials required to access it. 28 + 29 + If you wish to configure Nix manually, you can view the binary cache endpoint and the cache public key: 30 + 31 + ```console 32 + $ attic cache info foo 33 + Public: true 34 + Public Key: foo:WcnO6s4aVkB6CKRaPPpKvHLZykWXASV6c+/Ssg8uQEY= 35 + Binary Cache Endpoint: https://attic.domain.tld/foo 36 + Store Directory: /nix/store 37 + Priority: 41 38 + Upstream Cache Keys: ["cache.nixos.org-1"] 39 + Retention Period: Global Default 40 + ``` 41 + 42 + On NixOS, you can configure the cache declaratively in your system configuration with the above information: 43 + 44 + ```nix 45 + { 46 + nix.settings = { 47 + substituters = [ 48 + "https://attic.domain.tld/foo" 49 + ]; 50 + trusted-public-keys = [ 51 + "foo:WcnO6s4aVkB6CKRaPPpKvHLZykWXASV6c+/Ssg8uQEY=" 52 + ]; 53 + }; 54 + } 55 + ``` 56 + 27 57 ## Disabling a cache 28 58 29 59 To 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`