Files
nix-config/infra/rustfs/tf-s3-backend/run.sh
T
Ryan Yin 7e0e4aa566 feat(youko): replace MinIO with RustFS S3
Deploy RustFS in place of the retired MinIO and move the S3 consumers over.

- flake.nix / flake.lock / outputs/default.nix: add a nixpkgs-small
  (nixos-unstable-small) input for the rustfs 1.0.0 package (with the web
  console), instantiated as pkgs-small in genSpecialArgs alongside the other
  nixpkgs instances; drop the rustfs flake input. The rest of the system stays
  on the default nixpkgs.
- hosts/12kingdoms-youko/homelab-services/rustfs.nix: use nixpkgs' own
  services.rustfs module, with package = pkgs-small.rustfs and
  environmentFile = the agenix rustfs.env secret.
- caddy.nix: s3.writefor.fun (S3 API) and s3-console.writefor.fun (console,
  redirects / to /rustfs/console/).
- secrets/nixos.nix: declare a single rustfs.env (dotenv) secret holding
  RUSTFS_ACCESS_KEY / RUSTFS_SECRET_KEY, replacing the separate key files.
- infra/minio -> infra/rustfs: buckets are managed with the hashicorp/aws
  provider against the RustFS S3 endpoint; IAM/ILM are applied with rc.
2026-09-25 15:23:50 +08:00

14 lines
479 B
Bash

# Credentials for the RustFS S3 endpoint: the RustFS root credentials, or a
# dedicated account limited to this bucket (see ../README.md):
#
# export AWS_ACCESS_KEY_ID="xxx"
# export AWS_SECRET_ACCESS_KEY="xxx"
#
# If the bucket already exists (carried over from MinIO by the S3-level copy),
# import it first so terraform adopts it instead of failing to recreate it:
# terraform import aws_s3_bucket.tf-s3-backend tf-s3-backend
#
terraform init
terraform plan
terraform apply