snowflake/hosts/sora/services/attic.nix

42 lines
983 B
Nix
Raw Normal View History

2024-02-08 12:04:15 -05:00
{ config, pkgs, ... }:
2024-01-04 14:41:38 -05:00
{
2024-02-08 12:04:15 -05:00
sops.secrets.attic = { };
2024-01-04 14:41:38 -05:00
2024-02-08 12:04:15 -05:00
environment.systemPackages = [ pkgs.attic ];
2024-01-04 14:41:38 -05:00
services.atticd = {
enable = true;
credentialsFile = config.sops.secrets.attic.path;
settings = {
listen = "[::]:8200";
2024-02-08 12:04:15 -05:00
allowed-hosts = [ "cache.flake.sh" ];
2024-01-04 14:41:38 -05:00
database.url = "postgres://attic:attic@100.94.214.100:5432/attic";
2024-01-06 23:47:48 -05:00
api-endpoint = "https://cache.flake.sh/";
2024-01-04 14:41:38 -05:00
require-proof-of-possession = false;
chunking = {
nar-size-threshold = 0;
min-size = 16 * 1024; # 16 KiB
avg-size = 64 * 1024; # 64 KiB
max-size = 256 * 1024; # 256 KiB
};
garbage-collection = {
interval = "12 hours";
default-retention-period = "4 weeks";
};
compression = {
type = "zstd";
level = 9;
};
storage = {
type = "s3";
region = "us-east-1";
2024-01-05 13:30:49 -05:00
bucket = "kyasshu";
2024-01-04 14:41:38 -05:00
endpoint = "https://s3.flake.sh/";
};
};
};
}