Update dotfiles/.local/share/chezmoi/dot_local/assets/Betelgeuse.macOS.terminal, dotfiles/.local/share/chezmoi/dot_local/bin/executable_squash-symlink, dotfiles/.local/share/chezmoi/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ramqube, dotfiles/.local/share/chezmoi/dot_local/bin/executable_quickstart, dotfiles/.local/share/chezmoi/dot_local/bin/executable_provision, dotfiles/.local/share/chezmoi/dot_local/bin/executable_opener, dotfiles/.local/share/chezmoi/dot_local/bin/executable_logg, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ksetwallpaper, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-terminal-theme, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-dotfiles, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-export, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-export
Deleted dotfiles/.local/bin/dotfile-system-prune
2022-11-22 09:48:25 -08:00
#!/usr/bin/env bash
2022-11-30 01:02:39 -08:00
set -eox pipefail
2022-12-02 07:33:04 -08:00
{{ includeTemplate "universal/logg" }}
2022-12-01 23:56:41 -08:00
2022-11-30 01:02:39 -08:00
### Qubes dom0
if command -v qubesctl > /dev/null; then
# The VM name that will manage the Ansible provisioning (for Qubes dom0)
ANSIBLE_PROVISION_VM="provision"
# Ensure sys-whonix is configured (for Qubes dom0)
CONFIG_WIZARD_COUNT=0
ENABLE_OBFSC='false'
function configureWizard() {
if xwininfo -root -tree | grep "Anon Connection Wizard"; then
WINDOW_ID="$(xwininfo -root -tree | grep "Anon Connection Wizard" | sed 's/^ *\([^ ]*\) .*/\1/')"
xdotool windowactivate " $ WINDOW_ID " && sleep 1 && xdotool key 'Enter' && sleep 1 && xdotool key 'Tab Tab Enter' && sleep 24 && xdotool windowactivate " $ WINDOW_ID " && sleep 1 && xdotool key 'Enter' && sleep 300
qvm-shutdown --wait sys-whonix
sleep 3
qvm-start sys-whonix
if xwininfo -root -tree | grep "systemcheck | Whonix" > /dev/null; then
WINDOW_ID_SYSCHECK="$(xwininfo -root -tree | grep "systemcheck | Whonix" | sed 's/^ *\([^ ]*\) .*/\1/')"
if xdotool windowactivate " $ WINDOW_ID_SYS_CHECK "; then
sleep 1
xdotool key 'Enter'
fi
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
fi
else
2022-11-30 01:02:39 -08:00
sleep 3
CONFIG_WIZARD_COUNT=$((CONFIG_WIZARD_COUNT + 1))
if [[ " $ CONFIG_WIZARD_COUNT " == '4' ]]; then
echo "The sys-whonix anon-connection-wizard utility did not open."
else
echo "Checking for anon-connection-wizard again.."
configureWizard
fi
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
fi
2022-11-30 01:02:39 -08:00
}
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
### Ensure dom0 is updated
if [ ! -f /root/dom0-updated ]; then
sudo qubesctl --show-output state.sls update.qubes-dom0
sudo qubes-dom0-update --clean -y
touch /root/dom0-updated
Update dotfiles/.local/share/chezmoi/dot_local/assets/Betelgeuse.macOS.terminal, dotfiles/.local/share/chezmoi/dot_local/bin/executable_squash-symlink, dotfiles/.local/share/chezmoi/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ramqube, dotfiles/.local/share/chezmoi/dot_local/bin/executable_quickstart, dotfiles/.local/share/chezmoi/dot_local/bin/executable_provision, dotfiles/.local/share/chezmoi/dot_local/bin/executable_opener, dotfiles/.local/share/chezmoi/dot_local/bin/executable_logg, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ksetwallpaper, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-terminal-theme, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-dotfiles, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-export, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-export
Deleted dotfiles/.local/bin/dotfile-system-prune
2022-11-22 09:48:25 -08:00
fi
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
### Ensure sys-whonix is running
if ! qvm-check --running sys-whonix; then
qvm-start sys-whonix --skip-if-running
configureWizard > /dev/null
fi
### Ensure TemplateVMs are updated
if [ ! -f /root/templatevms-updated ]; then
# timeout of 10 minutes is added here because the whonix-gw VM does not like to get updated
# with this method. Anyone know how to fix this?
sudo timeout 600 qubesctl --show-output --skip-dom0 --templates state.sls update.qubes-vm &> /dev/null || EXIT_CODE=$?
while read RESTART_VM; do
qvm-shutdown --wait " $ RESTART_VM "
done< <(qvm-ls --all --no-spinner --fields=name,state | grep Running | grep -v sys-net | grep -v sys-firewall | grep -v sys-whonix | grep -v dom0 | awk '{print $1}')
sudo touch /root/templatevms-updated
fi
### Ensure provisioning VM can run commands on any VM
echo "/bin/bash" | sudo tee /etc/qubes-rpc/qubes.VMShell
sudo chmod 755 /etc/qubes-rpc/qubes.VMShell
echo " $ ANSIBLE_PROVISION_VM "' dom0 allow' | sudo tee /etc/qubes-rpc/policy/qubes.VMShell
echo " $ ANSIBLE_PROVISION_VM "' $ anyvm allow' | sudo tee -a /etc/qubes-rpc/policy/qubes.VMShell
sudo chown "$(whoami):$(whoami)" /etc/qubes-rpc/policy/qubes.VMShell
sudo chmod 644 /etc/qubes-rpc/policy/qubes.VMShell
### Create provisioning VM and initialize the provisioning process from there
qvm-create --label red --template debian-11 " $ ANSIBLE_PROVISION_VM " &> /dev/null || EXIT_CODE=$?
qvm-volume extend " $ ANSIBLE_PROVISION_VM :private" "40G"
if [ -f ~/.vaultpass ]; then
qvm-run " $ ANSIBLE_PROVISION_VM " 'rm -f ~/QubesIncoming/dom0/.vaultpass'
qvm-copy-to-vm " $ ANSIBLE_PROVISION_VM " ~/.vaultpass
qvm-run " $ ANSIBLE_PROVISION_VM " 'cp ~/QubesIncoming/dom0/.vaultpass ~/.vaultpass'
fi
qvm-run --pass-io " $ ANSIBLE_PROVISION_VM " 'curl -sSL https://install.doctor/start > ~/start.sh && bash ~/start.sh'
exit 0
2022-11-30 01:02:39 -08:00
fi
### System package manager update / Homebrew dependencies
if ! command -v curl > /dev/null || ! command -v git > /dev/null; then
2022-12-01 23:56:41 -08:00
logg 'Ensuring `curl` and `git` are installed via the system package manager'
2022-11-30 01:02:39 -08:00
if command -v apt-get > /dev/null; then
# Debian / Ubuntu
sudo apt-get update
sudo apt-get install -y curl git
elif command -v dnf > /dev/null; then
# Fedora
sudo dnf install -y curl git
elif command -v yum > /dev/null; then
# CentOS
sudo yum install -y curl git
elif command -v pacman > /dev/null; then
# Archlinux
sudo pacman update
sudo pacman -Sy curl git
elif command -v zypper > /dev/null; then
# OpenSUSE
sudo zypper install -y curl git nodejs
elif command -v apk > /dev/null; then
# Alpine
apk add curl git
elif [ -d /Applications ] && [ -d /Library ]; then
# macOS
sudo xcode-select -p >/dev/null 2>&1 || xcode-select --install
elif command -v nix-env > /dev/null; then
# NixOS
echo "TODO - Add support for NixOS"
elif [[ " $ OSTYPE " == 'freebsd'* ]]; then
# FreeBSD
echo "TODO - Add support for FreeBSD"
elif command -v pkg > /dev/null; then
# Termux
echo "TODO - Add support for Termux"
elif command -v xbps-install > /dev/null; then
# Void
echo "TODO - Add support for Void"
elif [[ " $ OSTYPE " == 'cygwin' ]] || [[ " $ OSTYPE " == 'msys' ]] || [[ " $ OSTYPE " == 'win32' ]]; then
# Windows
choco install -y curl git node
fi
Update dotfiles/.local/share/chezmoi/dot_local/assets/Betelgeuse.macOS.terminal, dotfiles/.local/share/chezmoi/dot_local/bin/executable_squash-symlink, dotfiles/.local/share/chezmoi/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ramqube, dotfiles/.local/share/chezmoi/dot_local/bin/executable_quickstart, dotfiles/.local/share/chezmoi/dot_local/bin/executable_provision, dotfiles/.local/share/chezmoi/dot_local/bin/executable_opener, dotfiles/.local/share/chezmoi/dot_local/bin/executable_logg, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ksetwallpaper, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-terminal-theme, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-dotfiles, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-export, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-export
Deleted dotfiles/.local/bin/dotfile-system-prune
2022-11-22 09:48:25 -08:00
fi
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
### Install Homebrew
ensurePackageManagerHomebrew() {
if ! command -v brew > /dev/null; then
2022-12-01 23:56:41 -08:00
logg info 'Installing Homebrew'
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
if command -v sudo > /dev/null && sudo -n true; then
echo | bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
2022-12-01 23:56:41 -08:00
logg info 'Looks like the user does not have passwordless sudo privileges. A sudo password may be required.'
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || BREW_EXIT_CODE="$?"
if [ -n " $ BREW_EXIT_CODE " ]; then
if command -v brew > /dev/null; then
logg warn 'Homebrew was installed but part of the installation failed. Attempting to fix..'
BREW_DIRS="share/man share/doc share/zsh/site-functions etc/bash_completion.d"
for BREW_DIR in $ BREW_DIRS ; do
if [ -d "$(brew --prefix)/ $ BREW_DIR " ]; then
sudo chown -R "$(whoami)" "$(brew --prefix)/ $ BREW_DIR "
fi
done
brew update --force --quiet
fi
fi
fi
fi
}
ensurePackageManagerHomebrew
Update dotfiles/.local/share/chezmoi/dot_local/assets/Betelgeuse.macOS.terminal, dotfiles/.local/share/chezmoi/dot_local/bin/executable_squash-symlink, dotfiles/.local/share/chezmoi/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ramqube, dotfiles/.local/share/chezmoi/dot_local/bin/executable_quickstart, dotfiles/.local/share/chezmoi/dot_local/bin/executable_provision, dotfiles/.local/share/chezmoi/dot_local/bin/executable_opener, dotfiles/.local/share/chezmoi/dot_local/bin/executable_logg, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ksetwallpaper, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-terminal-theme, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-dotfiles, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-export, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-export
Deleted dotfiles/.local/bin/dotfile-system-prune
2022-11-22 09:48:25 -08:00
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
### Install installer dependencies via Homebrew
2022-11-30 01:02:39 -08:00
installBrewPackage() {
if ! command -v "$1" > /dev/null; then
2022-12-01 23:56:41 -08:00
logg 'Installing `'"$1"'`'
2022-11-30 01:02:39 -08:00
brew install "$1"
fi
}
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
if command -v brew > /dev/null; then
2022-11-30 01:02:39 -08:00
installBrewPackage chezmoi
2022-12-01 23:56:41 -08:00
installBrewPackage glow
installBrewPackage gum
2022-11-30 01:02:39 -08:00
installBrewPackage node
installBrewPackage zx
Update dotfiles/.local/share/chezmoi/dot_local/assets/Betelgeuse.macOS.terminal, dotfiles/.local/share/chezmoi/dot_local/bin/executable_squash-symlink, dotfiles/.local/share/chezmoi/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ramqube, dotfiles/.local/share/chezmoi/dot_local/bin/executable_quickstart, dotfiles/.local/share/chezmoi/dot_local/bin/executable_provision, dotfiles/.local/share/chezmoi/dot_local/bin/executable_opener, dotfiles/.local/share/chezmoi/dot_local/bin/executable_logg, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ksetwallpaper, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-terminal-theme, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-dotfiles, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-export, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-export
Deleted dotfiles/.local/bin/dotfile-system-prune
2022-11-22 09:48:25 -08:00
fi
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
### Ensure source files are present
2022-12-01 23:56:41 -08:00
logg 'Ensuring /usr/local/src/hiawatha is owned by the user'
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
if [ -d /usr/local/src/hiawatha ] && [ ! -w /usr/local/src/hiawatha ]; then
sudo chown -Rf " $ USER ":"$(id -g -n)" /usr/local/src/hiawatha
fi
if [ -d /usr/local/src/hiawatha/.git ]; then
2022-12-01 23:56:41 -08:00
logg info 'Pulling the latest changes from https://gitlab.com/megabyte-labs/dotfiles.git to /usr/local/src/hiawatha'
2022-11-30 01:38:53 -08:00
cd /usr/local/src/hiawatha
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
git config pull.rebase false
2022-11-30 01:35:14 -08:00
git reset --hard HEAD
git clean -fxd
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
git pull origin master
Update dotfiles/.local/share/chezmoi/dot_local/assets/Betelgeuse.macOS.terminal, dotfiles/.local/share/chezmoi/dot_local/bin/executable_squash-symlink, dotfiles/.local/share/chezmoi/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ramqube, dotfiles/.local/share/chezmoi/dot_local/bin/executable_quickstart, dotfiles/.local/share/chezmoi/dot_local/bin/executable_provision, dotfiles/.local/share/chezmoi/dot_local/bin/executable_opener, dotfiles/.local/share/chezmoi/dot_local/bin/executable_logg, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ksetwallpaper, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-terminal-theme, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-dotfiles, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-export, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-export
Deleted dotfiles/.local/bin/dotfile-system-prune
2022-11-22 09:48:25 -08:00
else
2022-12-01 23:56:41 -08:00
logg info 'Cloning https://gitlab.com/megabyte-labs/dotfiles.git to /usr/local/src/hiawatha'
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
rm -rf /usr/local/src/hiawatha
sudo git clone https://gitlab.com/megabyte-labs/dotfiles.git /usr/local/src/hiawatha
chown -Rf " $ USER ":"$(id -g -n)" /usr/local/src/hiawatha
Update dotfiles/.local/share/chezmoi/dot_local/assets/Betelgeuse.macOS.terminal, dotfiles/.local/share/chezmoi/dot_local/bin/executable_squash-symlink, dotfiles/.local/share/chezmoi/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ramqube, dotfiles/.local/share/chezmoi/dot_local/bin/executable_quickstart, dotfiles/.local/share/chezmoi/dot_local/bin/executable_provision, dotfiles/.local/share/chezmoi/dot_local/bin/executable_opener, dotfiles/.local/share/chezmoi/dot_local/bin/executable_logg, dotfiles/.local/share/chezmoi/dot_local/bin/executable_ksetwallpaper, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-terminal-theme, dotfiles/.local/share/chezmoi/dot_local/bin/executable_install-dotfiles, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-import, dotfiles/.local/share/chezmoi/dot_local/bin/executable_firefox-profile-export, dotfiles/.local/share/chezmoi/dot_local/bin/executable_chrome-profile-export
Deleted dotfiles/.local/bin/dotfile-system-prune
2022-11-22 09:48:25 -08:00
fi
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
### Copy folders
2022-12-01 23:56:41 -08:00
logg info 'Copying folders from /usr/local/src/hiawatha to the HOME directory'
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type d | while read FOLDER; do
BASENAME="$(basename " $ FOLDER ")"
2022-11-30 01:02:39 -08:00
# Prevent initial-scaffolding of OS-specific files since Chezmoi will handle them
2022-12-01 21:28:04 -08:00
if [ " $ BASENAME " != 'AppData' ] && [ " $ BASENAME " != 'Library' ] && [ " $ BASENAME " != '.git' ]; then
2022-11-30 01:02:39 -08:00
if [ ! -d " $ HOME / $ BASENAME " ]; then
mkdir -p " $ HOME / $ BASENAME "
fi
cp -rf " $ FOLDER /"* " $ HOME / $ BASENAME "
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
fi
done
### Copy files
2022-12-01 23:56:41 -08:00
logg info 'Copying files from /usr/local/src/hiawatha to the HOME directory'
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type f | while read FILE; do
BASENAME="$(basename " $ FILE ")"
2022-11-30 01:02:39 -08:00
# Prevent repository-specific files from being copied over to user's HOME
2022-11-30 01:21:36 -08:00
if [[ " $ BASENAME " != *'.md' ]] && [[ " $ BASENAME " != *'.sh' ]] && [ " $ BASENAME " != '.chezmoiroot' ] && [ " $ BASENAME " != 'logo.png' ] && [ " $ BASENAME " != '.gitlab-ci.yml' ]; then
2022-11-30 01:02:39 -08:00
cp " $ FILE " " $ HOME / $ BASENAME "
chmod 600 " $ HOME / $ BASENAME "
fi
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
done
### Ensure ~/.local/bin files are executable
2022-12-01 23:56:41 -08:00
logg info 'Ensuring scripts in ~/.local/bin are executable'
Update README.md, .local/share/chezmoi/home/dot_local/bin/executable_provision, .local/software.TODO/desktop/Brewfile, .local/software.TODO/desktop/Packages.config, .local/software.TODO/desktop/Wingetfile, .local/software.TODO/development/Brewfile, .local/software.TODO/development/Packages.config, .local/software.TODO/development/Scoopfile, .local/software.TODO/terminal/Brewfile, .local/software.TODO/terminal/Packages.config, .local/software.TODO/terminal/Scoopfile, .local/software.TODO/Gasfile.yml, .local/bin/provision, .local/bin/open, .local/share/chezmoi/home/dot_local/bin/executable_open, .local/share/chezmoi/home/dot_local/Taskfile-local.yml
Deleted .local/bin/quickstart, .local/bin/chrome-profile-export, .local/bin/chrome-profile-import, .local/bin/firefox-profile-export, .local/bin/firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, .local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, .local/share/chezmoi/home/dot_local/bin/executable_fonttest, .local/share/chezmoi/home/dot_local/bin/executable_quickstart, .local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
2022-11-29 22:54:50 -08:00
find " $ HOME /.local/bin" -maxdepth 1 -mindepth 1 -type f | while read BINFILE; do
chmod +x " $ BINFILE "
done
### Chezmoi
2022-12-01 23:56:41 -08:00
if [ ! -f " $ HOME /.config/chezmoi/chezmoi.yaml" ]; then
logg info 'Running `chezmoi init` since the ~/.config/chezmoi/chezmoi.yaml is not present'
chezmoi init
fi
logg info 'Running `chezmoi apply`'
2022-12-02 07:21:01 -08:00
cat <<EOF >> /tmp/chezmoi-intro
2022-12-02 08:43:15 -08:00
# User / Environment Variable Configuration
2022-12-02 07:21:01 -08:00
2022-12-02 08:43:15 -08:00
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.
2022-12-02 07:21:01 -08:00
2022-12-02 08:43:15 -08:00
### Work Environment
2022-12-02 07:21:01 -08:00
Set to true if you are setting up a work environment where things like Tor should
not be installed.
* Environment variable: `WORK_ENVIRONMENT`
2022-12-02 08:43:15 -08:00
### Restricted Environment
2022-12-02 07:21:01 -08:00
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`
2022-12-02 08:43:15 -08:00
### Software Group
2022-12-02 07:21:01 -08:00
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`
2022-12-02 08:43:15 -08:00
### Name
2022-12-02 07:21:01 -08:00
Enter your full name as you would like it to appear in configuration files such as the Git
configuration.
* Environment variable: `FULL_NAME`
2022-12-02 08:43:15 -08:00
### E-mail
2022-12-02 07:21:01 -08:00
Enter your primary e-mail address.
* Environment variable: `PRIMARY_EMAIL`
2022-12-02 08:43:15 -08:00
### Public GPG Key ID
2022-12-02 07:21:01 -08:00
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`
2022-12-02 08:43:15 -08:00
### Timezone
2022-12-02 07:21:01 -08:00
Enter your timezone in the format of `America/New_York`. It should be available in the TZ database.
* Environment variable: `TIMEZONE`
2022-12-02 08:43:15 -08:00
### Domain
2022-12-02 07:21:01 -08:00
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`
2022-12-02 08:43:15 -08:00
### CloudFlare API Token
2022-12-02 07:21:01 -08:00
The API token is used to automatically configure various web services that rely on public DNS
records.
* Environment variable: `CLOUDFLARE_API_TOKEN`
2022-12-02 08:43:15 -08:00
### GitHub Read-Only Token
2022-12-02 07:21:01 -08:00
Pass in a GitHub read-only token linked to your account to automatically save a backup of your
2022-12-02 07:51:25 -08:00
GitHub repositories. For more information, see [this link](https://github.com/gabrie30/ghorg #scm - provider - setup ) .
2022-12-02 07:21:01 -08:00
* Environment variable: `GITHUB_READ_TOKEN`
2022-12-02 08:43:15 -08:00
### GitLab Read-Only Token
2022-12-02 07:21:01 -08:00
Pass in a GitLab read-only token linked to your account to automatically save a backup of your
2022-12-02 07:51:25 -08:00
GitLab repositories. For more information, see [this link](https://github.com/gabrie30/ghorg #scm - provider - setup ) .
2022-12-02 07:21:01 -08:00
* Environment variable: `GITLAB_READ_TOKEN`
2022-12-02 08:43:15 -08:00
### G-mail Address
2022-12-02 07:21:01 -08:00
Add a G-mail address which you would like to use as the handler for outgoing SMTP mail.
* Environment variable: `GMAIL_ADDRESS`
2022-12-02 08:43:15 -08:00
### G-mail App Password
2022-12-02 07:21:01 -08:00
Add the app password to your G-mail address so that outgoing mail can be handled by G-mail.
* Environment variable: `GMAIL_APP_PASSWORD`
2022-12-02 08:43:15 -08:00
### Ngrok Authentication Token
2022-12-02 07:21:01 -08:00
Add your Ngrok authentication token so that the configuration file can be automatically
generated.
* Environment Variable: `NGROK_AUTH_TOKEN`
2022-12-02 08:43:15 -08:00
### Slack API Token
2022-12-02 07:21:01 -08:00
Add your Slack API token so that `slackterm` can be automatically set up.
* Environment Variable: `SLACK_API_TOKEN`
2022-12-02 08:43:15 -08:00
### Tabby Configuration ID
2022-12-02 07:21:01 -08:00
Add your Tabby configuration ID to automatically sync Tabby settings.
* Environment Variable: `TABBY_CONFIG_ID`
2022-12-02 08:43:15 -08:00
### Tabby Sync Token
2022-12-02 07:21:01 -08:00
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
2022-12-02 08:43:15 -08:00
### Show README.md snippet
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`'
2022-12-01 23:56:41 -08:00
chezmoi apply