Update .local/share/chezmoi/home/dot_local/bin/executable_provision.tmpl, .local/share/chezmoi/docs/CHEZMOI-INTRO.md, .local/share/chezmoi/home/dot_local/bin/executable_install-program
This commit is contained in:
parent
6dbe7c5869
commit
5ea8e814af
3 changed files with 132 additions and 131 deletions
120
.local/share/chezmoi/docs/CHEZMOI-INTRO.md
Normal file
120
.local/share/chezmoi/docs/CHEZMOI-INTRO.md
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
# User / Environment Variable Configuration
|
||||||
|
|
||||||
|
This script will automatically set up a handful of different configurations / integrations
|
||||||
|
if you decide to add your information. The script will first check for environment variables
|
||||||
|
and then show prompts to fill in the gaps if the system is not headless. Below you can find
|
||||||
|
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
|
||||||
|
|
||||||
|
Set to true if you are setting up a work environment where things like Tor should
|
||||||
|
not be installed.
|
||||||
|
|
||||||
|
* Environment variable: `WORK_ENVIRONMENT`
|
||||||
|
|
||||||
|
### Restricted Environment
|
||||||
|
|
||||||
|
Set to true if you are setting up an environment that should not use sudo / administrator
|
||||||
|
privileges. This is a WIP.
|
||||||
|
|
||||||
|
* Environment variable: `RESTRICTED_ENVIRONMENT`
|
||||||
|
|
||||||
|
### Software Group
|
||||||
|
|
||||||
|
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`.
|
||||||
|
|
||||||
|
* Environment variable: `SOFTWARE_GROUP`
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
Enter your full name as you would like it to appear in configuration files such as the Git
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
* Environment variable: `FULL_NAME`
|
||||||
|
|
||||||
|
### E-mail
|
||||||
|
|
||||||
|
Enter your primary e-mail address.
|
||||||
|
|
||||||
|
* Environment variable: `PRIMARY_EMAIL`
|
||||||
|
|
||||||
|
### Public GPG Key ID
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
* Environment variable: `KEYID`
|
||||||
|
|
||||||
|
### Timezone
|
||||||
|
|
||||||
|
Enter your timezone in the format of `America/New_York`. It should be available in the TZ database.
|
||||||
|
|
||||||
|
* Environment variable: `TIMEZONE`
|
||||||
|
|
||||||
|
### Domain
|
||||||
|
|
||||||
|
The domain address you would like to use for any part of the deployment that involves launching
|
||||||
|
a publicly web service.
|
||||||
|
|
||||||
|
* Environment variable: `PUBLIC_SERVICES_DOMAIN`
|
||||||
|
|
||||||
|
### CloudFlare API Token
|
||||||
|
|
||||||
|
The API token is used to automatically configure various web services that rely on public DNS
|
||||||
|
records.
|
||||||
|
|
||||||
|
* Environment variable: `CLOUDFLARE_API_TOKEN`
|
||||||
|
|
||||||
|
### GitHub Read-Only Token
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
* Environment variable: `GITHUB_READ_TOKEN`
|
||||||
|
|
||||||
|
### GitLab Read-Only Token
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
* Environment variable: `GITLAB_READ_TOKEN`
|
||||||
|
|
||||||
|
### G-mail Address
|
||||||
|
|
||||||
|
Add a G-mail address which you would like to use as the handler for outgoing SMTP mail.
|
||||||
|
|
||||||
|
* Environment variable: `GMAIL_ADDRESS`
|
||||||
|
|
||||||
|
### G-mail App Password
|
||||||
|
|
||||||
|
Add the app password to your G-mail address so that outgoing mail can be handled by G-mail.
|
||||||
|
|
||||||
|
* Environment variable: `GMAIL_APP_PASSWORD`
|
||||||
|
|
||||||
|
### Ngrok Authentication Token
|
||||||
|
|
||||||
|
Add your Ngrok authentication token so that the configuration file can be automatically
|
||||||
|
generated.
|
||||||
|
|
||||||
|
* Environment Variable: `NGROK_AUTH_TOKEN`
|
||||||
|
|
||||||
|
### Slack API Token
|
||||||
|
|
||||||
|
Add your Slack API token so that `slackterm` can be automatically set up.
|
||||||
|
|
||||||
|
* Environment Variable: `SLACK_API_TOKEN`
|
||||||
|
|
||||||
|
### Tabby Configuration ID
|
||||||
|
|
||||||
|
Add your Tabby configuration ID to automatically sync Tabby settings.
|
||||||
|
|
||||||
|
* Environment Variable: `TABBY_CONFIG_ID`
|
||||||
|
|
||||||
|
### Tabby Sync Token
|
||||||
|
|
||||||
|
Add your Tabby sync token to automatically sync Tabby settings. This works in conjunction with
|
||||||
|
the Tabby Configuration ID mentioned above.
|
||||||
|
|
||||||
|
* Environment Variable: `TABBY_SYNC_TOKEN`
|
|
@ -251,7 +251,12 @@ async function afterInstall(packageManager) {
|
||||||
if (packageManager === 'appimage') {
|
if (packageManager === 'appimage') {
|
||||||
} else if (packageManager === 'ansible') {
|
} else if (packageManager === 'ansible') {
|
||||||
log('info', 'Post-Install', `Ensuring temporary passwordless sudo privileges used by Ansible are removed`)
|
log('info', 'Post-Install', `Ensuring temporary passwordless sudo privileges used by Ansible are removed`)
|
||||||
await $`sudo sed -i '/# TEMPORARY FOR ANSIBLE INSTALL/d' /etc/sudoers`
|
const gsed = which.sync('gsed', { nothrow: true })
|
||||||
|
if (gsed) {
|
||||||
|
await $`sudo gsed -i '/# TEMPORARY FOR ANSIBLE INSTALL/dg' /etc/sudoers`
|
||||||
|
} else {
|
||||||
|
await $`sudo sed -i '/# TEMPORARY FOR ANSIBLE INSTALL/dg' /etc/sudoers`
|
||||||
|
}
|
||||||
} else if (packageManager === 'apk') {
|
} else if (packageManager === 'apk') {
|
||||||
} else if (packageManager === 'apt') {
|
} else if (packageManager === 'apt') {
|
||||||
} else if (packageManager === 'basher') {
|
} else if (packageManager === 'basher') {
|
||||||
|
@ -287,7 +292,7 @@ async function beforeInstall(packageManager) {
|
||||||
if (packageManager === 'appimage') {
|
if (packageManager === 'appimage') {
|
||||||
} else if (packageManager === 'ansible') {
|
} else if (packageManager === 'ansible') {
|
||||||
log('info', 'Pre-Install', `Temporarily enabling passwordless sudo for Ansible role installations`)
|
log('info', 'Pre-Install', `Temporarily enabling passwordless sudo for Ansible role installations`)
|
||||||
await $`sudo echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR ANSIBLE INSTALL" > /etc/sudoers`
|
await $`echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR ANSIBLE INSTALL" | sudo tee -a`
|
||||||
} else if (packageManager === 'apk') {
|
} else if (packageManager === 'apk') {
|
||||||
} else if (packageManager === 'apt') {
|
} else if (packageManager === 'apt') {
|
||||||
await $`sudo apt-get update`
|
await $`sudo apt-get update`
|
||||||
|
|
|
@ -217,140 +217,16 @@ find "$HOME/.local/bin" -maxdepth 1 -mindepth 1 -type f | while read BINFILE; do
|
||||||
chmod +x "$BINFILE"
|
chmod +x "$BINFILE"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
### Show README.md snippet
|
||||||
|
if command -v glow > /dev/null; then
|
||||||
|
glow "$HOME/.local/share/chezmoi/docs/CHEZMOI-INTRO.md"
|
||||||
|
fi
|
||||||
|
|
||||||
### Chezmoi
|
### Chezmoi
|
||||||
if [ ! -f "$HOME/.config/chezmoi/chezmoi.yaml" ]; then
|
if [ ! -f "$HOME/.config/chezmoi/chezmoi.yaml" ]; then
|
||||||
logg info 'Running `chezmoi init` since the ~/.config/chezmoi/chezmoi.yaml is not present'
|
logg info 'Running `chezmoi init` since the ~/.config/chezmoi/chezmoi.yaml is not present'
|
||||||
chezmoi init
|
chezmoi init
|
||||||
fi
|
fi
|
||||||
logg info 'Running `chezmoi apply`'
|
|
||||||
cat <<EOF >> /tmp/chezmoi-intro
|
|
||||||
# User / Environment Variable Configuration
|
|
||||||
|
|
||||||
This script will automatically set up a handful of different configurations / integrations
|
|
||||||
if you decide to add your information. The script will first check for environment variables
|
|
||||||
and then show prompts to fill in the gaps if the system is not headless. Below you can find
|
|
||||||
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
|
|
||||||
|
|
||||||
Set to true if you are setting up a work environment where things like Tor should
|
|
||||||
not be installed.
|
|
||||||
|
|
||||||
* Environment variable: `WORK_ENVIRONMENT`
|
|
||||||
|
|
||||||
### Restricted Environment
|
|
||||||
|
|
||||||
Set to true if you are setting up an environment that should not use sudo / administrator
|
|
||||||
privileges. This is a WIP.
|
|
||||||
|
|
||||||
* Environment variable: `RESTRICTED_ENVIRONMENT`
|
|
||||||
|
|
||||||
### Software Group
|
|
||||||
|
|
||||||
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`.
|
|
||||||
|
|
||||||
* Environment variable: `SOFTWARE_GROUP`
|
|
||||||
|
|
||||||
### Name
|
|
||||||
|
|
||||||
Enter your full name as you would like it to appear in configuration files such as the Git
|
|
||||||
configuration.
|
|
||||||
|
|
||||||
* Environment variable: `FULL_NAME`
|
|
||||||
|
|
||||||
### E-mail
|
|
||||||
|
|
||||||
Enter your primary e-mail address.
|
|
||||||
|
|
||||||
* Environment variable: `PRIMARY_EMAIL`
|
|
||||||
|
|
||||||
### Public GPG Key ID
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
* Environment variable: `KEYID`
|
|
||||||
|
|
||||||
### Timezone
|
|
||||||
|
|
||||||
Enter your timezone in the format of `America/New_York`. It should be available in the TZ database.
|
|
||||||
|
|
||||||
* Environment variable: `TIMEZONE`
|
|
||||||
|
|
||||||
### Domain
|
|
||||||
|
|
||||||
The domain address you would like to use for any part of the deployment that involves launching
|
|
||||||
a publicly web service.
|
|
||||||
|
|
||||||
* Environment variable: `PUBLIC_SERVICES_DOMAIN`
|
|
||||||
|
|
||||||
### CloudFlare API Token
|
|
||||||
|
|
||||||
The API token is used to automatically configure various web services that rely on public DNS
|
|
||||||
records.
|
|
||||||
|
|
||||||
* Environment variable: `CLOUDFLARE_API_TOKEN`
|
|
||||||
|
|
||||||
### GitHub Read-Only Token
|
|
||||||
|
|
||||||
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).
|
|
||||||
|
|
||||||
* Environment variable: `GITHUB_READ_TOKEN`
|
|
||||||
|
|
||||||
### GitLab Read-Only Token
|
|
||||||
|
|
||||||
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).
|
|
||||||
|
|
||||||
* Environment variable: `GITLAB_READ_TOKEN`
|
|
||||||
|
|
||||||
### G-mail Address
|
|
||||||
|
|
||||||
Add a G-mail address which you would like to use as the handler for outgoing SMTP mail.
|
|
||||||
|
|
||||||
* Environment variable: `GMAIL_ADDRESS`
|
|
||||||
|
|
||||||
### G-mail App Password
|
|
||||||
|
|
||||||
Add the app password to your G-mail address so that outgoing mail can be handled by G-mail.
|
|
||||||
|
|
||||||
* Environment variable: `GMAIL_APP_PASSWORD`
|
|
||||||
|
|
||||||
### Ngrok Authentication Token
|
|
||||||
|
|
||||||
Add your Ngrok authentication token so that the configuration file can be automatically
|
|
||||||
generated.
|
|
||||||
|
|
||||||
* Environment Variable: `NGROK_AUTH_TOKEN`
|
|
||||||
|
|
||||||
### Slack API Token
|
|
||||||
|
|
||||||
Add your Slack API token so that `slackterm` can be automatically set up.
|
|
||||||
|
|
||||||
* Environment Variable: `SLACK_API_TOKEN`
|
|
||||||
|
|
||||||
### Tabby Configuration ID
|
|
||||||
|
|
||||||
Add your Tabby configuration ID to automatically sync Tabby settings.
|
|
||||||
|
|
||||||
* Environment Variable: `TABBY_CONFIG_ID`
|
|
||||||
|
|
||||||
### Tabby Sync Token
|
|
||||||
|
|
||||||
Add your Tabby sync token to automatically sync Tabby settings. This works in conjunction with
|
|
||||||
the Tabby Configuration ID mentioned above.
|
|
||||||
|
|
||||||
* Environment Variable: `TABBY_SYNC_TOKEN`
|
|
||||||
##
|
|
||||||
EOF
|
|
||||||
|
|
||||||
### Show README.md snippet
|
|
||||||
if command -v glow > /dev/null; then
|
|
||||||
glow /tmp/chezmoi-intro
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Prompt for variables
|
### Prompt for variables
|
||||||
if command -v gum > /dev/null; then
|
if command -v gum > /dev/null; then
|
||||||
|
|
Loading…
Reference in a new issue