summaryrefslogtreecommitdiff
path: root/systems/atlas/attic.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-12-13 22:06:24 -0500
committerseth <[email protected]>2023-12-14 03:34:54 -0500
commit78a344c27ded577693734ed733a57cfd582700a3 (patch)
tree2679c6b33073c70c6f33a66f5ef3955fefe64bff /systems/atlas/attic.nix
parent974decdfa3449f47892532f9ac728275fb9fa2df (diff)
tree-wide: back to attic & gha again
Diffstat (limited to 'systems/atlas/attic.nix')
-rw-r--r--systems/atlas/attic.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/systems/atlas/attic.nix b/systems/atlas/attic.nix
new file mode 100644
index 0000000..a810eb5
--- /dev/null
+++ b/systems/atlas/attic.nix
@@ -0,0 +1,33 @@
+{
+ config,
+ inputs',
+ secretsDir,
+ ...
+}: {
+ age.secrets.atticCreds.file = secretsDir + "/atticCreds.age";
+
+ environment.systemPackages = [inputs'.attic.packages.default];
+
+ services.atticd = {
+ enable = true;
+
+ credentialsFile = config.age.secrets.atticCreds.path;
+
+ settings = {
+ listen = "[::]:5000";
+
+ api-endpoint = "https://cache.${config.networking.domain}/";
+
+ chunking = let
+ kb = 1024;
+ in {
+ nar-size-threshold = 64 * kb;
+ min-size = 16 * kb;
+ avg-size = 64 * kb;
+ max-size = 256 * kb;
+ };
+
+ compression.type = "zstd";
+ };
+ };
+}