Skip to content
This repository was archived by the owner on Jan 25, 2026. It is now read-only.

Commit ba373b6

Browse files
committed
Use env var for the server address
1 parent f0cefba commit ba373b6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Snarf is a small and flexible Nix binary (NAR) cache based on [Snix](https://sni
44

55
## Status
66

7-
The project is not ready for production use, but it is functional as a basic cache: please try Snarf and report any issues here. A rough roadmap is below:
7+
The project is not ready for production use, but it is functional as a basic cache: please give Snarf a try and report any issues here. A rough roadmap is below:
88

99
- [x] `snarfd` server wraps Snix' nar-bridge.
1010
- [x] `snarf` client to perform uploads
@@ -67,15 +67,16 @@ Deploy the configuration and verify that the server is started with `systemctl s
6767
First, you need to initialize the server. The client is authenticated via a token when it uploads store paths to the server. When the server first boots up, it is in an uninitialized state. Initialize the admin token by executing the following:
6868

6969
```sh
70-
$ snarf -s <server-host>:9000 create-token
70+
$ export SNARF_SERVER_ADDRESS="<your-server-host>:9000"
71+
$ snarf -s create-token
7172
```
7273

7374
Set the environment variable `SNARF_CLIENT_TOKEN` to the token returned by the `create-token` command.
7475

7576
Second, upload the closure of a path by executing
7677

7778
```sh
78-
$ snarf -s <server-host>:9000 add-closure /nix/store/...
79+
$ snarf add-closure /nix/store/...
7980
```
8081

8182
Currently, Snarf uses Nix' sqlite database to compute the closure.
@@ -87,7 +88,7 @@ Currently, Snarf uses Nix' sqlite database to compute the closure.
8788

8889
### Structure
8990

90-
Currently, the server binary combines a `snix-store` and the `nar-bridge` functionality. The former part is authenticated via PASETO tokens and can be connected to by providing valid PASETO tokens.
91+
The server binary combines a `snix-store` and the `nar-bridge` functionality. The former part is authenticated via PASETO tokens and can be connected to by providing valid PASETO tokens.
9192
For a Nix user, the server looks like a normal Nix binary cache. For authenticated users, it is an extended Snix store that manages the data.
9293

9394
## Contributing

0 commit comments

Comments
 (0)