ncro/config: replace YAML configuration file with TOML
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ifb3cf9ad9747795b44eff1ee8cd538536a6a6964
This commit is contained in:
parent
56413f4b60
commit
49545fdb6b
20 changed files with 280 additions and 199 deletions
39
config.example.toml
Normal file
39
config.example.toml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
[server]
|
||||
listen = ":8080"
|
||||
read_timeout = "30s"
|
||||
write_timeout = "30s"
|
||||
|
||||
[[upstreams]]
|
||||
url = "https://cache.nixos.org"
|
||||
priority = 10
|
||||
public_key = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
|
||||
# Try without a public key.
|
||||
[[upstreams]]
|
||||
url = "https://nix-community.cachix.org"
|
||||
priority = 20
|
||||
|
||||
[cache]
|
||||
db_path = "/var/lib/ncro/routes.db"
|
||||
max_entries = 100000
|
||||
ttl = "1h"
|
||||
negative_ttl = "10m"
|
||||
latency_alpha = 0.3
|
||||
|
||||
[discovery]
|
||||
enabled = false
|
||||
service_name = "_nix-serve._tcp"
|
||||
domain = "local"
|
||||
discovery_time = "5s"
|
||||
priority = 20
|
||||
|
||||
[mesh]
|
||||
enabled = false
|
||||
bind_addr = "0.0.0.0:7946"
|
||||
peers = []
|
||||
private_key = "/etc/ncro/node.key"
|
||||
gossip_interval = "30s"
|
||||
|
||||
[logging]
|
||||
level = "info"
|
||||
format = "json"
|
||||
Loading…
Add table
Add a link
Reference in a new issue