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.

book/user-guide: Make the example more detailed

+26 -13
+26 -13
book/src/user-guide/README.md
··· 24 24 attic use foo 25 25 ``` 26 26 27 - On NixOS you can add the cache declaratively in your `configuration.nix`: 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 28 40 ``` 29 - nix.settings = { 30 - substituters = [ 31 - "BINARY_CACHE_ENDPOINT" 32 - ]; 33 - trusted-public-keys = [ 34 - "CACHE_PUBLIC_KEY" 35 - ]; 36 - }; 37 - ``` 41 + 42 + On NixOS, you can configure the cache declaratively in your system configuration with the above information: 38 43 39 - To view the binary cache endpoint and cache public key for `foo`: 40 - ``` 41 - attic cache info foo 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 + } 42 55 ``` 43 56 44 57 ## Disabling a cache