nixos-config/hosts/chunk/attic.nix

32 lines
802 B
Nix
Raw Normal View History

2025-01-05 06:02:42 -05:00
{ config, ... }:
2025-01-05 05:42:52 -05:00
{
services.atticd = {
enable = true;
environmentFile = config.sops.secrets."attic/env".path;
settings = {
listen = "[::]:8090";
api-endpoint = "https://cache.cything.io/";
allowed-hosts = [ "cache.cything.io" ];
2025-01-05 06:11:02 -05:00
require-proof-of-possession = false;
2025-01-05 05:42:52 -05:00
compression.type = "zstd";
2025-01-05 06:11:02 -05:00
database.url = "postgresql:///atticd?host=/run/postgresql";
2025-01-05 05:42:52 -05:00
storage = {
type = "s3";
2025-01-05 06:58:28 -05:00
region = "auto";
2025-01-05 05:42:52 -05:00
bucket = "cy7";
endpoint = "https://e3e97aac307d106a7becea43cef8fcbd.r2.cloudflarestorage.com";
};
chunking = {
nar-size-threshold = 64 * 1024; # 64 KiB
min-size = 16 * 1024; # 16 KiB
avg-size = 64 * 1024; # 64 KiB
max-size = 256 * 1024; # 256 KiB
};
};
};
}