Compare commits

...

2 Commits

Author SHA1 Message Date
d964a181ad builder: add attic binary cache
All checks were successful
Update Nix Flake / update-flake (push) Successful in 1m19s
2025-03-22 12:55:16 +01:00
27c36bb7f5 topgrade: update flake.lock to flake-updates branch version 2025-03-22 12:54:48 +01:00
3 changed files with 47 additions and 2 deletions

View File

@ -38,6 +38,9 @@ in
misc.assume_yes = true;
misc.no_retry = true;
pre_commands."Update flake" =
"git -C /home/julian/.dotfiles checkout origin/flake-updates -- flake.lock";
linux.nix_arguments = "--flake /home/julian/.dotfiles";
linux.home_manager_arguments = [
"--flake"

File diff suppressed because one or more lines are too long

View File

@ -211,6 +211,11 @@
locations."/".proxyPass =
"http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
};
clientMaxBodySize = "2G";
virtualHosts."cache.julian-mutter.de" = {
locations."/".proxyPass = "http://127.0.0.1:8080";
};
};
# =========== Gitea actions ==========
@ -242,6 +247,42 @@
secretKeyFile = "/var/cache-priv-key.pem";
};
# =========== Binary Cache with attic ==========
sops.secrets."attic_token".sopsFile = ../../../secrets/secrets-builder.yaml;
services.atticd = {
enable = true;
environmentFile = config.sops.secrets."attic_token".path;
settings = {
listen = "[::]:8080";
jwt = { };
# Data chunking
#
# Warning: If you change any of the values here, it will be
# difficult to reuse existing chunks for newly-uploaded NARs
# since the cutpoints will be different. As a result, the
# deduplication ratio will suffer for a while after the change.
chunking = {
# The minimum NAR size to trigger chunking
#
# If 0, chunking is disabled entirely for newly-uploaded NARs.
# If 1, all NARs are chunked.
nar-size-threshold = 64 * 1024; # 64 KiB
# The preferred minimum size of a chunk, in bytes
min-size = 16 * 1024; # 16 KiB
# The preferred average size of a chunk, in bytes
avg-size = 64 * 1024; # 64 KiB
# The preferred maximum size of a chunk, in bytes
max-size = 256 * 1024; # 256 KiB
};
};
};
# ======================== DO NOT CHANGE THIS ========================
system.stateVersion = "23.11";
# ======================== DO NOT CHANGE THIS ========================