WIP: attic: init s3 storage #4

Closed
notohh wants to merge 1 commit from attic-binary-cache into master
2 changed files with 14 additions and 2 deletions

View file

@ -1,9 +1,10 @@
{config, ...}: { {config, ...}: {
sops.secrets.attic-secret = {}; sops.secrets.attic-secret = {};
sops.secrets.s3-keyid = {};
sops.secrets.s3-secret-key = {};
services.atticd = { services.atticd = {
enable = true; enable = true;
credentialsFile = "/etc/attic/atticd.env"; credentialsFile = config.sops.secrets.attic-secret.path;
settings = { settings = {
listen = "[::]:8100"; listen = "[::]:8100";
allowed-hosts = ["cache.notohh.dev"]; allowed-hosts = ["cache.notohh.dev"];
@ -19,6 +20,16 @@
max-size = 256 * 1024; # 256 KiB 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 = { garbage-collection = {
interval = "12 hours"; interval = "12 hours";
default-retention-period = "2 weeks"; default-retention-period = "2 weeks";

View file

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