diff --git a/home/dot_config/shell/exports.sh.tmpl b/home/dot_config/shell/exports.sh.tmpl index 1f8a5f43..58b64710 100644 --- a/home/dot_config/shell/exports.sh.tmpl +++ b/home/dot_config/shell/exports.sh.tmpl @@ -348,7 +348,7 @@ export PATH="$VOLTA_HOME/bin:$PATH" ### Wakatime export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" -export WAKATIME_API_KEY="{{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "WAKATIME_API_KEY")) }}{{ includeTemplate "secrets/VAGRANT_CLOUD_TOKEN" | decrypt }}{{ else }}{{ env "WAKATIME_API_KEY" }}{{ end }}" +export WAKATIME_API_KEY="{{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "WAKATIME_API_KEY")) }}{{ includeTemplate "secrets/VAGRANT_CLOUD_TOKEN" | decrypt | trim }}{{ else }}{{ env "WAKATIME_API_KEY" }}{{ end }}" ### wget export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" diff --git a/home/dot_config/slack-term/config.tmpl b/home/dot_config/slack-term/config.tmpl index 2245ea30..c75bc62d 100644 --- a/home/dot_config/slack-term/config.tmpl +++ b/home/dot_config/slack-term/config.tmpl @@ -1,5 +1,5 @@ { - "slack_token": "{{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "SLACK_API_TOKEN")) }}{{- includeTemplate "secrets/SLACK_API_TOKEN" | decrypt -}}{{ else }}{{- env "SLACK_API_TOKEN" -}}{{ end }}", + "slack_token": "{{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "SLACK_API_TOKEN")) }}{{- includeTemplate "secrets/SLACK_API_TOKEN" | decrypt | trim -}}{{ else }}{{- env "SLACK_API_TOKEN" -}}{{ end }}", "sidebar_width": 3, "notify": "mention", "emoji": true, diff --git a/home/dot_config/wakatime/.wakatime.cfg b/home/dot_config/wakatime/.wakatime.cfg index 23c07030..e62d06a4 100644 --- a/home/dot_config/wakatime/.wakatime.cfg +++ b/home/dot_config/wakatime/.wakatime.cfg @@ -1,4 +1,4 @@ {{- if (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) -}} [settings] -api_key = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "WAKATIME_API_KEY")) }}{{ includeTemplate "secrets/VAGRANT_CLOUD_TOKEN" | decrypt }}{{ else }}{{ env "WAKATIME_API_KEY" }}{{ end }} +api_key = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "WAKATIME_API_KEY")) }}{{ includeTemplate "secrets/WAKATIME_API_KEY" | decrypt | trim }}{{ else }}{{ env "WAKATIME_API_KEY" }}{{ end }} {{- end }} diff --git a/home/dot_config/warp/private_mdm.xml.tmpl b/home/dot_config/warp/private_mdm.xml.tmpl index deb2b417..bda6605f 100644 --- a/home/dot_config/warp/private_mdm.xml.tmpl +++ b/home/dot_config/warp/private_mdm.xml.tmpl @@ -13,8 +13,8 @@ support_url https://megabyte.space auth_client_id - {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_TEAMS_CLIENT_ID")) }}{{- includeTemplate "secrets/CLOUDFLARE_TEAMS_CLIENT_ID" | decrypt -}}{{ else }}{{- env "CLOUDFLARE_TEAMS_CLIENT_ID" -}}{{ end }} + {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_TEAMS_CLIENT_ID")) }}{{- includeTemplate "secrets/CLOUDFLARE_TEAMS_CLIENT_ID" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_TEAMS_CLIENT_ID" -}}{{ end }} auth_client_secret - {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_TEAMS_CLIENT_SECRET")) }}{{- includeTemplate "secrets/CLOUDFLARE_TEAMS_CLIENT_SECRET" | decrypt -}}{{ else }}{{- env "CLOUDFLARE_TEAMS_CLIENT_SECRET" -}}{{ end }} + {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_TEAMS_CLIENT_SECRET")) }}{{- includeTemplate "secrets/CLOUDFLARE_TEAMS_CLIENT_SECRET" | decrypt | trim -}}{{ else }}{{- env "CLOUDFLARE_TEAMS_CLIENT_SECRET" -}}{{ end }} {{ end -}} diff --git a/home/dot_local/bin/executable_gist.tmpl b/home/dot_local/bin/executable_gist.tmpl index 3cf311c2..3d616e88 100644 --- a/home/dot_local/bin/executable_gist.tmpl +++ b/home/dot_local/bin/executable_gist.tmpl @@ -1,5 +1,5 @@ #!/usr/bin/env bash -echo "{{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NPM_TOKEN")) }}{{ includeTemplate "secrets/NPM_TOKEN" | decrypt }}{{ else if (env "NPM_TOKEN") }}{{ env "NPM_TOKEN" }}{{ else }}${GITHUB_GIST_TOKEN}{{ end }}" > ~/.gist +echo "{{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NPM_TOKEN")) }}{{ includeTemplate "secrets/NPM_TOKEN" | decrypt | trim }}{{ else if (env "NPM_TOKEN") }}{{ env "NPM_TOKEN" }}{{ else }}${GITHUB_GIST_TOKEN}{{ end }}" > ~/.gist gist $* rm -f ~/.gist