From 90411b997c347ec133c3e61b0d1f2c8682e994c1 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 10 Dec 2023 07:05:50 -0500 Subject: atlas: start hosting attic --- systems/atlas/attic.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 systems/atlas/attic.nix (limited to 'systems/atlas/attic.nix') diff --git a/systems/atlas/attic.nix b/systems/atlas/attic.nix new file mode 100644 index 0000000..d6e15eb --- /dev/null +++ b/systems/atlas/attic.nix @@ -0,0 +1,34 @@ +{config, ...}: let + kb = 1024; +in { + age.secrets.atticCreds.file = + ../../secrets/${config.networking.hostName}/atticCreds.age; + + services.atticd = { + enable = true; + credentialsFile = config.age.secrets.atticCreds.path; + + settings = { + listen = "[::]:5000"; + api-endpoint = "https://cache.${config.networking.domain}/"; + + compression.type = "zstd"; + + chunking = { + nar-size-threshold = 64 * kb; + min-size = 16 * kb; + avg-size = 64 * kb; + max-size = 256 * kb; + }; + + database = { + type = "s3"; + region = "us-west-004"; + bucket = "getchoo-attic"; + endpoint = "s3.us-west-004.backblazeb2.com"; + }; + + garbage-collection.interval = "12 hours"; + }; + }; +} -- cgit v1.2.3