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";
|
2025-02-24 21:38:02 -05:00
|
|
|
api-endpoint = "https://cache.cy7.sh/";
|
|
|
|
allowed-hosts = [ "cache.cy7.sh" ];
|
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 = {
|
2025-02-24 21:38:02 -05:00
|
|
|
type = "s3";
|
|
|
|
region = "auto";
|
|
|
|
bucket = "attic";
|
|
|
|
endpoint = "https://e3e97aac307d106a7becea43cef8fcbd.r2.cloudflarestorage.com";
|
2025-01-05 05:42:52 -05:00
|
|
|
};
|
|
|
|
|
2025-01-05 20:19:16 -05:00
|
|
|
garbage-collection = {
|
2025-02-24 21:38:02 -05:00
|
|
|
default-retention-period = "2 weeks";
|
2025-01-05 05:42:52 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2025-01-27 05:49:00 -05:00
|
|
|
|
2025-02-24 21:38:02 -05:00
|
|
|
services.caddy.virtualHosts."cache.cy7.sh".extraConfig = ''
|
2025-01-27 05:49:00 -05:00
|
|
|
import common
|
|
|
|
reverse_proxy localhost:8090
|
|
|
|
'';
|
2025-01-05 05:42:52 -05:00
|
|
|
}
|