install.fairie/home/dot_config/rclone/private_system-rclone.conf.tmpl

29 lines
1.2 KiB
Cheetah
Raw Normal View History

{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "key-cloudflare-r2-id")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "key-cloudflare-r2-secret")) (ne .user.cloudflare.r2 "") -}}
[private]
type = s3
provider = Cloudflare
env_auth = false
access_key_id = {{ includeTemplate "secrets/key-cloudflare-r2-id" | decrypt -}}
secret_access_key = {{ includeTemplate "secrets/key-cloudflare-r2-secret" | decrypt -}}
endpoint = {{ .user.cloudflare.r2 }}.r2.cloudflarestorage.com/private
acl = private
[public]
type = s3
provider = Cloudflare
env_auth = false
access_key_id = {{ includeTemplate "secrets/key-cloudflare-r2-id" | decrypt -}}
secret_access_key = {{ includeTemplate "secrets/key-cloudflare-r2-secret" | decrypt -}}
endpoint = {{ .user.cloudflare.r2 }}.r2.cloudflarestorage.com/public
acl = public-read
[system]
type = s3
provider = Cloudflare
env_auth = false
access_key_id = {{ includeTemplate "secrets/key-cloudflare-r2-id" | decrypt -}}
secret_access_key = {{ includeTemplate "secrets/key-cloudflare-r2-secret" | decrypt -}}
endpoint = {{ .user.cloudflare.r2 }}.r2.cloudflarestorage.com/system
acl = private
{{ end -}}