snowflake/hosts/sakura/services/atticd.nix

37 lines
984 B
Nix
Raw Normal View History

2023-06-12 00:04:26 -04:00
{config, ...}: {
2023-06-19 08:19:17 -04:00
sops.secrets.attic-secret = {};
sops.secrets.s3-keyid = {};
sops.secrets.s3-secret-key = {};
2023-06-25 13:19:14 -04:00
2023-06-12 00:04:26 -04:00
services.atticd = {
enable = true;
credentialsFile = config.sops.secrets.attic-secret.path;
2023-06-12 00:04:26 -04:00
settings = {
listen = "[::]:8100";
allowed-hosts = ["cache.notohh.dev"];
2023-06-25 13:19:14 -04:00
database.url = "postgres://atticd:atticd@192.168.1.211:5432/atticd";
api-endpoint = "https://cache.notohh.dev/";
require-proof-of-possession = false;
2023-06-12 00:04:26 -04:00
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
};
storage = {
type = "s3";
region = "us-east-005";
bucket = "notoh-binary-cache";
endpoint = "https://s3.us-east-005.backblazeb2.com";
};
2023-06-12 00:04:26 -04:00
garbage-collection = {
interval = "12 hours";
default-retention-period = "2 weeks";
};
};
};
}