2023-03-20 02:32:51 -07:00
|
|
|
{{- if and (or (and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_ID"))) (env "CLOUDFLARE_R2_ID")) (or (and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_SECRET"))) (env "CLOUDFLARE_R2_SECRET")) (ne .user.cloudflare.r2 "") -}}
|
2023-04-18 22:15:21 -07:00
|
|
|
[docker]
|
2023-06-18 20:30:41 -07:00
|
|
|
access_key_id = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_ID")) }}{{- includeTemplate "secrets/CLOUDFLARE_R2_ID" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_R2_ID" -}}{{ end }}
|
2023-04-18 22:15:21 -07:00
|
|
|
acl = private
|
2023-07-16 03:10:04 -07:00
|
|
|
endpoint = {{ .user.cloudflare.r2 }}.r2.cloudflarestorage.com
|
2023-01-29 20:44:55 -08:00
|
|
|
env_auth = false
|
2023-04-18 22:15:21 -07:00
|
|
|
provider = Cloudflare
|
2023-06-18 20:30:41 -07:00
|
|
|
secret_access_key = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_SECRET")) }}{{- includeTemplate "secrets/CLOUDFLARE_R2_SECRET" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_R2_SECRET" -}}{{ end }}
|
2023-04-18 22:15:21 -07:00
|
|
|
type = s3
|
|
|
|
|
2023-07-16 03:10:04 -07:00
|
|
|
[Private]
|
2023-06-18 20:30:41 -07:00
|
|
|
access_key_id = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_ID")) }}{{- includeTemplate "secrets/CLOUDFLARE_R2_ID" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_R2_ID" -}}{{ end }}
|
2023-01-29 20:44:55 -08:00
|
|
|
acl = private
|
2023-07-16 03:10:04 -07:00
|
|
|
endpoint = {{ .user.cloudflare.r2 }}.r2.cloudflarestorage.com
|
2023-04-18 22:15:21 -07:00
|
|
|
env_auth = false
|
|
|
|
provider = Cloudflare
|
2023-06-18 20:30:41 -07:00
|
|
|
secret_access_key = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_SECRET")) }}{{- includeTemplate "secrets/CLOUDFLARE_R2_SECRET" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_R2_SECRET" -}}{{ end }}
|
2023-04-18 22:15:21 -07:00
|
|
|
type = s3
|
2023-01-29 20:44:55 -08:00
|
|
|
|
2023-07-16 03:10:04 -07:00
|
|
|
[Public]
|
2023-06-18 20:30:41 -07:00
|
|
|
access_key_id = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_ID")) }}{{- includeTemplate "secrets/CLOUDFLARE_R2_ID" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_R2_ID" -}}{{ end }}
|
2023-01-29 20:44:55 -08:00
|
|
|
acl = public-read
|
2023-07-16 03:10:04 -07:00
|
|
|
endpoint = {{ .user.cloudflare.r2 }}.r2.cloudflarestorage.com
|
2023-04-18 22:15:21 -07:00
|
|
|
env_auth = false
|
|
|
|
provider = Cloudflare
|
2023-06-18 20:30:41 -07:00
|
|
|
secret_access_key = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_SECRET")) }}{{- includeTemplate "secrets/CLOUDFLARE_R2_SECRET" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_R2_SECRET" -}}{{ end }}
|
2023-04-18 22:15:21 -07:00
|
|
|
type = s3
|
2023-01-29 20:44:55 -08:00
|
|
|
|
|
|
|
[system]
|
2023-06-18 20:30:41 -07:00
|
|
|
access_key_id = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_ID")) }}{{- includeTemplate "secrets/CLOUDFLARE_R2_ID" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_R2_ID" -}}{{ end }}
|
2023-01-29 20:44:55 -08:00
|
|
|
acl = private
|
2023-07-16 03:10:04 -07:00
|
|
|
endpoint = {{ .user.cloudflare.r2 }}.r2.cloudflarestorage.com
|
2023-04-18 22:15:21 -07:00
|
|
|
env_auth = false
|
|
|
|
provider = Cloudflare
|
2023-06-18 20:30:41 -07:00
|
|
|
secret_access_key = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_SECRET")) }}{{- includeTemplate "secrets/CLOUDFLARE_R2_SECRET" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_R2_SECRET" -}}{{ end }}
|
2023-04-18 22:15:21 -07:00
|
|
|
type = s3
|
2023-01-29 20:44:55 -08:00
|
|
|
{{ end -}}
|