From 7359228e43ef41e1ea801bf3f0fc96301ef361a4 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:41:42 +0000 Subject: [PATCH] Latest --- docs/customization/secrets.md | 1 + home/.chezmoidata.yaml | 1 + home/.chezmoitemplates/secrets/FIG_TOKEN | 7 ++++++ home/dot_config/shell/private_private.sh.tmpl | 3 +++ software.yml | 22 ++++++++++++++----- 5 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 home/.chezmoitemplates/secrets/FIG_TOKEN diff --git a/docs/customization/secrets.md b/docs/customization/secrets.md index c46093aa..8078c26f 100644 --- a/docs/customization/secrets.md +++ b/docs/customization/secrets.md @@ -184,6 +184,7 @@ Unless otherwise specified in the description column, all of the variables in th | `DOCKERHUB_USER` | DockerHub username which is used in combination with the `DOCKERHUB_TOKEN` to headlessly authenticate Docker Desktop with DockerHub | | `DOCKERHUB_TOKEN` | DockerHub API token stored in `~/.config/shell/private.sh` so developer API keys can be loaded by running `source "~/.config/shell/private.sh"`. | | `ELEVENLABS_API_KEY` | API key for ElevenLabs which is used by [ShortGPT](https://github.com/RayVentura/ShortGPT) | +| `FIG_TOKEN` | Fig user API token used to headlessly login / authenticate with Fig. Token can be acquired on the [token dashboard](https://app.fig.io/settings/user-tokens) after logging in. | | `FULL_NAME` | Your full name used in things like the Git config and NPM config. This can be passed in as an environment variable or hardcoded into the `home/.chezmoi.yaml.tmpl` file. | | `GCE_SERVICE_ACCOUNT_EMAIL` | Injected into `~/.config/shell/private.sh` and saved in your Chezmoi configuration. _Can only be passed in as environment variable or hardcoded into `home/.chezmoi.yaml.tmpl`._ | | `GITHUB_GIST_TOKEN` | GitHub token with gist permissions. Populates `~/.local/bin/gist` so that the key does not have to be stored in the `~` directory. | diff --git a/home/.chezmoidata.yaml b/home/.chezmoidata.yaml index 9e3addd0..d34f5459 100644 --- a/home/.chezmoidata.yaml +++ b/home/.chezmoidata.yaml @@ -1179,6 +1179,7 @@ softwareGroups: - mqttx - ndb - pieces + - pieces-os - pieces-cli - pika - postman diff --git a/home/.chezmoitemplates/secrets/FIG_TOKEN b/home/.chezmoitemplates/secrets/FIG_TOKEN new file mode 100644 index 00000000..4ac82f4e --- /dev/null +++ b/home/.chezmoitemplates/secrets/FIG_TOKEN @@ -0,0 +1,7 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiWUl2YTRURTd4MHQ0ZWdi +eEtVT1liTm5ZbExtM0VFUVk1cGdkUDNQUlVJClFjOEs4OURvS0IxRzdpZ0R5VUVh +Z3FZN0l4QlFWQnBMQjhRaDFDNEhUVkkKLS0tIG9KNkxiejNma3JRWS9hMEhNcDRB +YXRwZUlyWWVFVy9qRm5tUXJ0YUFmZTgKNT2XOgMxVxf/B+ofbjjB1ua8siR7k80R +A8xdSfKb0G8rIqfbLTMXcVH1OPmzMUyvw/wSsK+Cr9CELTAkx/aJakh2H3p/7o4= +-----END AGE ENCRYPTED FILE----- \ No newline at end of file diff --git a/home/dot_config/shell/private_private.sh.tmpl b/home/dot_config/shell/private_private.sh.tmpl index 7636ab3a..93944f69 100644 --- a/home/dot_config/shell/private_private.sh.tmpl +++ b/home/dot_config/shell/private_private.sh.tmpl @@ -44,6 +44,9 @@ export DOCKERHUB_REGISTRY_PASSWORD="$DOCKERHUB_TOKEN" ### Elevenlabs export ELEVENLABS_API_KEY="{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "ELEVENLABS_API_KEY")) }}{{ includeTemplate "secrets/ELEVENLABS_API_KEY" | decrypt | trim }}{{ else }}{{ env "ELEVENLABS_API_KEY" }}{{ end }}" +### Fig +export FIG_TOKEN="{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "FIG_TOKEN")) }}{{ includeTemplate "secrets/FIG_TOKEN" | decrypt | trim }}{{ else }}{{ env "FIG_TOKEN" }}{{ end }}" + ### GitHub export GH_TOKEN="{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "GITHUB_TOKEN")) }}{{ includeTemplate "secrets/GITHUB_TOKEN" | decrypt | trim }}{{ else }}{{ env "GITHUB_TOKEN" }}{{ end }}" export GITHUB_TOKEN="$GH_TOKEN" diff --git a/software.yml b/software.yml index 52caf654..3d2df639 100644 --- a/software.yml +++ b/software.yml @@ -400,17 +400,28 @@ softwarePackages: choco: genymotion # TODO: Figure out how to install on Android pieces: - _bin:snap: pieces-os + _bin: pieces-for-developers _desc: Pieces is a first-in-kind productivity suite that optimizes developer tools and eliminates the chaos of context switching. _docs: https://docs.pieces.app/ _github: false _home: https://pieces.app/ _name: Pieces + _when:cask: '! test -d /Applications/Pieces.app && ! test -d $HOME/Applications/Pieces.app' + appinstaller: https://builds.pieces.app/stages/production/appinstaller/pieces_for_x.appinstaller + cask: pieces + exe: https://builds.pieces.app/stages/production/pieces_for_x/windows-exe/download + snap: pieces-for-developers + pieces-os: + _bin: pieces-os + _docs: https://docs.pieces.app/ + _github: false + _home: https://pieces.app/ + _name: Pieces OS _post:snap: sudo snap connect pieces-os:dotnet-runtime-aspnetcore - _when:script:darwin: '! test -d /Applications/Pieces.app && ! test -d $HOME/Applications/Pieces.app' - # TODO - Figure out how to deal with appinstaller - appinstaller: https://builds.pieces.app/stages/production/pieces_suite_windows/appinstaller/download - script:darwin: cd /tmp && curl -sSL https://builds.pieces.app/stages/production/macos_packaging/pkg/download > Pieces.pkg && sudo installer -pkg Pieces.pkg -target / && rm -f /tmp/Pieces.pkg + _when:cask: '! test -d /Applications/Pieces.app && ! test -d $HOME/Applications/Pieces.app' + appinstaller: https://builds.pieces.app/stages/production/appinstaller/os_server.appinstaller + cask: pieces-os + exe: https://builds.pieces.app/stages/production/os_server/windows-exe/download snap: pieces-os pieces-cli: _bin: pieces @@ -3181,6 +3192,7 @@ softwarePackages: _github: https://github.com/withfig/autocomplete _home: https://fig.io/ _name: Fig + _post: source ~/.config/shell/private.sh && fig login --token "$FIG_TOKEN" _when:cask: '! test -d "/Applications/Fig.app" && ! test -d "$HOME/Applications/Fig.app"' cask: fig steampipe: