diff --git a/flake.lock b/flake.lock index 6bc841b..5a484e7 100644 --- a/flake.lock +++ b/flake.lock @@ -270,11 +270,11 @@ }, "nix-secrets": { "locked": { - "lastModified": 1743461057, - "narHash": "sha256-xHT8l0aGNEF8Tbj9/EBWB7icxP0OBQCJAysyExRsdmc=", + "lastModified": 1743779608, + "narHash": "sha256-7cWwb2Rs12BdH8GF5R+NINBxFuBUv4e2gpUH/s2qc5I=", "ref": "refs/heads/master", - "rev": "100e6817b2277d9d3dfc358392ada2f03a5239f5", - "revCount": 56, + "rev": "0b262b0cdd02fb9dec2bdf8e657288dab4f0e009", + "revCount": 57, "type": "git", "url": "ssh://git@github.com/TheWanderingCrow/nix-secrets" }, diff --git a/infrastructure/wce.nix b/infrastructure/wce.nix index f16f06e..5f8a0ca 100644 --- a/infrastructure/wce.nix +++ b/infrastructure/wce.nix @@ -9,9 +9,9 @@ source = "hashicorp/aws"; version = "5.86.0"; }; - cloudflare = { - source = "cloudflare/cloudflare"; - version = "5.0.0"; + b2 = { + source = "Backblaze/b2"; + version = "0.10.0"; }; }; backend."s3" = { @@ -34,6 +34,11 @@ }; }; + "b2_bucket"."media" = { + bucket_name = "wce-media-backup"; + bucket_type = "allPrivate"; + }; + # "cloudflare_r2_bucket"."cache" = { # account_id = "68c4b3ab47c1a97037ab5a938f772d69"; # name = "wce-attic-cache"; diff --git a/shell.nix b/shell.nix index 4131793..fbd24b8 100644 --- a/shell.nix +++ b/shell.nix @@ -4,6 +4,8 @@ DIGITALOCEAN_TOKEN = builtins.readFile /run/secrets/digitalocean/token; CLOUDFLARE_API_TOKEN = builtins.readFile /run/secrets/cloudflare/token; AWS_PROFILE = "wce"; + B2_APPLICATION_KEY_ID = builtins.readFile /run/secrets/backblaze/id; + B2_APPLICATION_KEY = builtins.readFile /run/secrets/backblaze/key; nativeBuildInputs = with pkgs; [ git vim