diff --git a/home/dot_config/ghorg/conf.yaml.tmpl b/home/dot_config/ghorg/conf.yaml.tmpl index 46da5d48..ca06186f 100644 --- a/home/dot_config/ghorg/conf.yaml.tmpl +++ b/home/dot_config/ghorg/conf.yaml.tmpl @@ -149,7 +149,7 @@ GHORG_EXIT_CODE_ON_CLONE_ISSUES: 1 # Add your GitHub token # flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 -GHORG_GITHUB_TOKEN: {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "GITHUB_READ_TOKEN")) }}{{ includeTemplate "secrets/GITHUB_READ_TOKEN" | decrypt }}{{ else }}{{ env "GITHUB_READ_TOKEN" }}{{ end }} +GHORG_GITHUB_TOKEN: {{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "GITHUB_READ_TOKEN")) }}{{ includeTemplate "secrets/GITHUB_READ_TOKEN" | decrypt }}{{ else }}{{ env "GITHUB_READ_TOKEN" }}{{ end }} # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ # |G|I|T|L|A|B| |S|P|E|C|I|F|I|C| @@ -157,7 +157,7 @@ GHORG_GITHUB_TOKEN: {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" # Add your GitLab token # flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 -GHORG_GITLAB_TOKEN: {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "GITLAB_READ_TOKEN")) }}{{ includeTemplate "secrets/GITLAB_READ_TOKEN" | decrypt }}{{ else }}{{ env "GITLAB_READ_TOKEN" }}{{ end }} +GHORG_GITLAB_TOKEN: {{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "GITLAB_READ_TOKEN")) }}{{ includeTemplate "secrets/GITLAB_READ_TOKEN" | decrypt }}{{ else }}{{ env "GITLAB_READ_TOKEN" }}{{ end }} # clones repos in a directory structure that matches gitlab namespaces eg company/unit/subunit/app would clone into ghorg/org/unit/subunit/app # flag (--preserve-dir) diff --git a/home/dot_config/npm/npmrc.tmpl b/home/dot_config/npm/npmrc.tmpl index e621db86..259bbd30 100644 --- a/home/dot_config/npm/npmrc.tmpl +++ b/home/dot_config/npm/npmrc.tmpl @@ -9,4 +9,4 @@ loglevel=error network-concurrency=32 prefix={{ .chezmoi.homeDir }}/.local/share/npm strict-peer-dependencies=false -//registry.npmjs.org/:_authToken={{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NPM_TOKEN")) }}{{- includeTemplate "secrets/NPM_TOKEN" | decrypt -}}{{ else if (env "NPM_TOKEN") }}{{- env "NPM_TOKEN" -}}{{ else }}${NPM_TOKEN}{{ end }} \ No newline at end of file +//registry.npmjs.org/:_authToken={{ 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 }}${NPM_TOKEN}{{ end }} \ No newline at end of file diff --git a/home/dot_config/shell/exports.sh.tmpl b/home/dot_config/shell/exports.sh.tmpl index 9005a696..03614438 100644 --- a/home/dot_config/shell/exports.sh.tmpl +++ b/home/dot_config/shell/exports.sh.tmpl @@ -343,7 +343,7 @@ export PATH="$VOLTA_HOME/bin:$PATH" ### Wakatime export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" -export WAKATIME_API_KEY="{{ if (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 }}{{ 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 1111cf78..2245ea30 100644 --- a/home/dot_config/slack-term/config.tmpl +++ b/home/dot_config/slack-term/config.tmpl @@ -1,5 +1,5 @@ { - "slack_token": "{{ if (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 -}}{{ else }}{{- env "SLACK_API_TOKEN" -}}{{ end }}", "sidebar_width": 3, "notify": "mention", "emoji": true, diff --git a/home/dot_local/bin/executable_gist.tmpl b/home/dot_local/bin/executable_gist.tmpl index 0846d4fe..3cf311c2 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 (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 }}{{ else if (env "NPM_TOKEN") }}{{ env "NPM_TOKEN" }}{{ else }}${GITHUB_GIST_TOKEN}{{ end }}" > ~/.gist gist $* rm -f ~/.gist