attic: init s3 storage
All checks were successful
ci/woodpecker/push/checks Pipeline was successful
ci/woodpecker/pr/checks Pipeline was successful

This commit is contained in:
notohh 2023-09-20 18:23:28 -04:00
parent 7d8085d60f
commit fe59bab239
Signed by: notohh
GPG key ID: BD47506D475EE86D
2 changed files with 14 additions and 2 deletions

View file

@ -1,9 +1,10 @@
{config, ...}: {
sops.secrets.attic-secret = {};
sops.secrets.s3-keyid = {};
sops.secrets.s3-secret-key = {};
services.atticd = {
enable = true;
credentialsFile = "/etc/attic/atticd.env";
credentialsFile = config.sops.secrets.attic-secret.path;
settings = {
listen = "[::]:8100";
allowed-hosts = ["cache.notohh.dev"];
@ -19,6 +20,16 @@
max-size = 256 * 1024; # 256 KiB
};
storage = {
type = "s3";
region = "auto";
bucket = "notoh-binary-cache";
endpoint = "https://s3.us-east-005.backblazeb2.com/";
credentials = {
access_key_id = config.sops.secrets.s3-keyid.path;
secret_access_key = config.sops.secrets.s3-secret-key.path;
};
};
garbage-collection = {
interval = "12 hours";
default-retention-period = "2 weeks";

View file

@ -1,5 +1,6 @@
{...}: {
imports = [
./atticd.nix
./traefik.nix
./authelia.nix
./hugo.nix