config: initial loading & env overrides

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Iaa7401a20506a084a2a16882e61ea0bc6a6a6964
This commit is contained in:
raf 2026-03-05 23:36:44 +03:00
commit 4f8d1c64d2
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 222 additions and 0 deletions

30
config.example.yaml Normal file
View file

@ -0,0 +1,30 @@
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
- url: "https://nix-community.cachix.org"
priority: 20
cache:
db_path: "/var/lib/ncro/routes.db"
max_entries: 100000
ttl: 1h
latency_alpha: 0.3
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"