Update dotfiles/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_after_10_install-aqua-packages.sh.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_after_15_install-asdf-packages.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_after_50-crontab.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_after_60-cleanup.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_after_80-bash-completions.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_after_99_bootstrap-z4h.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_1-logging-deps, dotfiles/.local/share/chezmoi/home/.chezmoiignore, dotfiles/.local/share/chezmoi/home/.chezmoiremove, dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/home/private_dot_config/rclone/merge_rclone.conf, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl

This commit is contained in:
Brian Zalewski 2022-11-24 21:48:06 +00:00
parent e31522cb85
commit 36c7259c66
12 changed files with 45 additions and 0 deletions

View file

@ -7,6 +7,10 @@
{{- $domain := "megabyte.space" -}}
{{- $cloudflareUsername := "noreply@megabyte.space" -}}
{{- $cloudflareToken := "" -}}
{{- $cloudflareAccessKeyId := "" -}}
{{- $cloudflareSecretAccessKey := "" -}}
{{- $cloudflareR2AccountId := "" -}}
{{- $digitalOceanSpacesAccessKeyId
{{- $githubReadToken := "" -}}
{{- $gitlabReadToken := "" -}}
{{- $ngrokAuthToken := "" -}}
@ -151,6 +155,9 @@ git:
autoCommit: true
autoPush: true
scriptEnv:
CLOUDFLARE_ACCESS_KEY_ID: "{{ $cloudflareAccessKeyId }}"
CLOUDFLARE_SECRET_ACCESS_KEY: "{{ $cloudflareSecretAccessKey }}"
CLOUDFLARE_R2_ACCOUNT_ID: "{{ $cloudflareR2AccountId }}"
LEXICON_CLOUDFLARE_USERNAME: "{{ $cloudflareUsername }}"
LEXICON_CLOUDFLARE_TOKEN: "{{ $cloudflareToken }}"
textconv:

View file

@ -59,6 +59,8 @@ softwarePackages:
port: bat
scoop: bat
zypper: bat
blockinfile:
go: github.com/ProfessorManhattan/blockinfile@latest
bundler:
gem: bundler
delta:
@ -395,6 +397,15 @@ softwarePackages:
port: pywhat
ramda:
npm: ramda-cli
rclone:
apt: rclone
brew: rclone
choco:
- rclone
- winfsp
- nssm
dnf: rclone
pacman: rclone
ripgrep:
_bin: rg
apt: ripgrep

View file

@ -2,6 +2,7 @@
!.chezmoiscripts/{{ .host.distro.id }}/**/*
{{- if ne .host.distro.id "windows" }}
!.chezmoiscripts/_universal/**/*
!.chezmoiscripts/universal/**/*
{{- end }}

View file

@ -1,3 +1,5 @@
.CFUserTextEncoding
.DS_Store
.asdf
Brewfile
.bash_logout
@ -10,9 +12,11 @@ Brewfile
.krew
.m2
.npmrc
.profile
.rustup
.subversion
.tmux.conf
.tmux.conf.local
.wgetrc
.zlogin
.zlogout

View file

@ -0,0 +1,22 @@
{{- if and (ne .scriptEnv.CLOUDFLARE_ACCESS_KEY_ID "") (ne .scriptEnv.CLOUDFLARE_SECRET_ACCESS_KEY "") (ne .scriptEnv.CLOUDFLARE_R2_ACCOUNT_ID "") }}
#!/usr/bin/env bash
R2_CONFIG=$(cat <<EOT
[r2-user]
type = s3
provider = Cloudflare
access_key_id = {{ .user.cloudflareAccessKeyId }}
secret_access_key = {{ .user.cloudflareSecretAccessKey }}
region = auto
endpoint = https://{{ .user.cloudflareR2AccountId }}.r2.cloudflarestorage.com
acl = private
EOT
)
# Consider https://github.com/dustinsand/blockinfile
if cat $HOME/.config/rclone/rclone.conf | grep '[r2-user]'; then
# TODO: Remove old block
fi
# TODO:
#tee -a
{{- end -}}