Update .local/share/chezmoi/home/dot_local/bin/executable_provision.tmpl, .local/share/chezmoi/home/.chezmoi.yaml.tmpl

This commit is contained in:
Brian Zalewski 2022-12-02 16:43:15 +00:00
parent bfc9244ace
commit 0acef3f6fc
2 changed files with 40 additions and 26 deletions

View file

@ -27,7 +27,7 @@
{{- end -}} {{- end -}}
{{- $softwareGroup := (default "Standard" (env "SOFTWARE_GROUP")) -}} {{- $softwareGroup := (default "Standard" (env "SOFTWARE_GROUP")) -}}
{{- if $desktopSession -}} {{- if $desktopSession -}}
{{- $softwareGroup = (join $softwareGroup "-Desktop") -}} {{- $softwareGroup = list $softwareGroup "-Desktop" | join "" -}}
{{- end -}} {{- end -}}
{{- $data := . }} {{- $data := . }}

View file

@ -224,120 +224,121 @@ if [ ! -f "$HOME/.config/chezmoi/chezmoi.yaml" ]; then
fi fi
logg info 'Running `chezmoi apply`' logg info 'Running `chezmoi apply`'
cat <<EOF >> /tmp/chezmoi-intro cat <<EOF >> /tmp/chezmoi-intro
# User / Environment Variables # User / Environment Variable Configuration
This script will automatically set up a handful of different configurations This script will automatically set up a handful of different configurations / integrations
should you decide to add your information. Below you can find a description of what if you decide to add your information. The script will first check for environment variables
each piece of information is used for as well as the name of the environment variable and then show prompts to fill in the gaps if the system is not headless. Below you can find
you can specify to bypass the prompt. a description of what each piece of information is used for as well as the name of the
environment variable you can specify to bypass the prompt.
## Work Environment ### Work Environment
Set to true if you are setting up a work environment where things like Tor should Set to true if you are setting up a work environment where things like Tor should
not be installed. not be installed.
* Environment variable: `WORK_ENVIRONMENT` * Environment variable: `WORK_ENVIRONMENT`
## Restricted Environment ### Restricted Environment
Set to true if you are setting up an environment that should not use sudo / administrator Set to true if you are setting up an environment that should not use sudo / administrator
privileges. This is a WIP. privileges. This is a WIP.
* Environment variable: `RESTRICTED_ENVIRONMENT` * Environment variable: `RESTRICTED_ENVIRONMENT`
## Software Group ### Software Group
The category you select for software group will determine which list of software should be The category you select for software group will determine which list of software should be
installed. The lists are configurable by modifying `~/.local/share/chezmoi/software.yml`. installed. The lists are configurable by modifying `~/.local/share/chezmoi/software.yml`.
* Environment variable: `SOFTWARE_GROUP` * Environment variable: `SOFTWARE_GROUP`
## Name ### Name
Enter your full name as you would like it to appear in configuration files such as the Git Enter your full name as you would like it to appear in configuration files such as the Git
configuration. configuration.
* Environment variable: `FULL_NAME` * Environment variable: `FULL_NAME`
## E-mail ### E-mail
Enter your primary e-mail address. Enter your primary e-mail address.
* Environment variable: `PRIMARY_EMAIL` * Environment variable: `PRIMARY_EMAIL`
## Public GPG Key ID ### Public GPG Key ID
If you have a public GPG key available on the Ubuntu or MIT keyservers, then you can enter it If you have a public GPG key available on the Ubuntu or MIT keyservers, then you can enter it
so that it is automatically imported. so that it is automatically imported.
* Environment variable: `KEYID` * Environment variable: `KEYID`
## Timezone ### Timezone
Enter your timezone in the format of `America/New_York`. It should be available in the TZ database. Enter your timezone in the format of `America/New_York`. It should be available in the TZ database.
* Environment variable: `TIMEZONE` * Environment variable: `TIMEZONE`
## Domain ### Domain
The domain address you would like to use for any part of the deployment that involves launching The domain address you would like to use for any part of the deployment that involves launching
a publicly web service. a publicly web service.
* Environment variable: `PUBLIC_SERVICES_DOMAIN` * Environment variable: `PUBLIC_SERVICES_DOMAIN`
## CloudFlare API Token ### CloudFlare API Token
The API token is used to automatically configure various web services that rely on public DNS The API token is used to automatically configure various web services that rely on public DNS
records. records.
* Environment variable: `CLOUDFLARE_API_TOKEN` * Environment variable: `CLOUDFLARE_API_TOKEN`
## GitHub Read-Only Token ### GitHub Read-Only Token
Pass in a GitHub read-only token linked to your account to automatically save a backup of your Pass in a GitHub read-only token linked to your account to automatically save a backup of your
GitHub repositories. For more information, see [this link](https://github.com/gabrie30/ghorg#scm-provider-setup). GitHub repositories. For more information, see [this link](https://github.com/gabrie30/ghorg#scm-provider-setup).
* Environment variable: `GITHUB_READ_TOKEN` * Environment variable: `GITHUB_READ_TOKEN`
## GitLab Read-Only Token ### GitLab Read-Only Token
Pass in a GitLab read-only token linked to your account to automatically save a backup of your Pass in a GitLab read-only token linked to your account to automatically save a backup of your
GitLab repositories. For more information, see [this link](https://github.com/gabrie30/ghorg#scm-provider-setup). GitLab repositories. For more information, see [this link](https://github.com/gabrie30/ghorg#scm-provider-setup).
* Environment variable: `GITLAB_READ_TOKEN` * Environment variable: `GITLAB_READ_TOKEN`
## G-mail Address ### G-mail Address
Add a G-mail address which you would like to use as the handler for outgoing SMTP mail. Add a G-mail address which you would like to use as the handler for outgoing SMTP mail.
* Environment variable: `GMAIL_ADDRESS` * Environment variable: `GMAIL_ADDRESS`
## G-mail App Password ### G-mail App Password
Add the app password to your G-mail address so that outgoing mail can be handled by G-mail. Add the app password to your G-mail address so that outgoing mail can be handled by G-mail.
* Environment variable: `GMAIL_APP_PASSWORD` * Environment variable: `GMAIL_APP_PASSWORD`
## Ngrok Authentication Token ### Ngrok Authentication Token
Add your Ngrok authentication token so that the configuration file can be automatically Add your Ngrok authentication token so that the configuration file can be automatically
generated. generated.
* Environment Variable: `NGROK_AUTH_TOKEN` * Environment Variable: `NGROK_AUTH_TOKEN`
## Slack API Token ### Slack API Token
Add your Slack API token so that `slackterm` can be automatically set up. Add your Slack API token so that `slackterm` can be automatically set up.
* Environment Variable: `SLACK_API_TOKEN` * Environment Variable: `SLACK_API_TOKEN`
## Tabby Configuration ID ### Tabby Configuration ID
Add your Tabby configuration ID to automatically sync Tabby settings. Add your Tabby configuration ID to automatically sync Tabby settings.
* Environment Variable: `TABBY_CONFIG_ID` * Environment Variable: `TABBY_CONFIG_ID`
## Tabby Sync Token ### Tabby Sync Token
Add your Tabby sync token to automatically sync Tabby settings. This works in conjunction with Add your Tabby sync token to automatically sync Tabby settings. This works in conjunction with
the Tabby Configuration ID mentioned above. the Tabby Configuration ID mentioned above.
@ -345,7 +346,20 @@ the Tabby Configuration ID mentioned above.
* Environment Variable: `TABBY_SYNC_TOKEN` * Environment Variable: `TABBY_SYNC_TOKEN`
## ##
EOF EOF
glow /tmp/chezmoi-intro
logg prompt 'Select the software group you would like to install. If your environment is a macOS, Windows, or environment with the DISPLAY environment variable then desktop software will be installed too. The software groups are in the ~/.local/share/chezmoi/home/.chezmoidata.yaml file.' ### Show README.md snippet
SOFTWARE_GROUP="$(gum choose "Basic" "Standard" "Development" "Experimental")" if command -v glow > /dev/null; then
glow /tmp/chezmoi-intro
fi
### Prompt for variables
if command -v gum > /dev/null; then
if [ -z "$SOFTWARE_GROUP" ]; then
logg prompt 'Select the software group you would like to install. If your environment is a macOS, Windows, or environment with the DISPLAY environment variable then desktop software will be installed too. The software groups are in the ~/.local/share/chezmoi/home/.chezmoidata.yaml file.'
SOFTWARE_GROUP="$(gum choose "Basic" "Standard" "Development" "Experimental")"
fi
fi
### Run chezmoi apply
logg info 'Running `chezmoi apply`'
chezmoi apply chezmoi apply