Update .local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_set-wallpaper.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_once_before_1-decrypt-age-key.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_10_install-aqua-packages.sh.tmpl, .local/share/chezmoi/home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/opensuse/run_onchange_before_11-install-opensuse-software.tmpl, .local/share/chezmoi/home/.chezmoiscripts/freebsd/run_onchange_before_11-install-freebsd-packages.tmpl, .local/share/chezmoi/home/.chezmoiscripts/fedora/run_onchange_before_10-install-fedora-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/debian/run_onchange_before_10-install-debian-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/centos/run_onchange_before_10-install-centos-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_50-crontab.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-zsh-plugins.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_5-install-homebrew.tmpl, .local/share/chezmoi/home/.chezmoiscripts/windows/run_onchange_before_11-install-windows-packages.tmpl

This commit is contained in:
Brian Zalewski 2022-12-02 06:36:57 +00:00
parent ac5ae27392
commit 97dc9b86b4
18 changed files with 64 additions and 34 deletions

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# universal/essential-packages hash: {{ include (joinPath ".chezmoitemplates" "universal" "essential-packages") | sha256sum }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# universal/essential-packages hash: {{ include (joinPath ".chezmoitemplates" "universal" "essential-packages") | sha256sum }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}

View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Betelgeuse-macOS wallpaper hash: {{ include (joinPath .chezmoi.homeDir ".local" "src" "betelgeuse" "share" "wallpapers" "Betelgeuse-macOS" "contents" "source.png") | sha256sum }}
### Set macOS wallpaper
if command -v m > /dev/null && [ -f "$HOME/.local/src/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png" ]; then
m wallpaper "$HOME/.local/src/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png"
else
logg warn 'Either `m` or the macOS default wallpaper is missing.'
fi

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# darwin/Brewfile hash: {{ include (joinPath ".chezmoitemplates" "darwin" "Brewfile") | sha256sum }}
{{- includeTemplate "universal/profile" }} {{- includeTemplate "universal/profile" }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# universal/essential-packages hash: {{ include (joinPath ".chezmoitemplates" "universal" "essential-packages") | sha256sum }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}}

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# universal/essential-packages hash: {{ include (joinPath ".chezmoitemplates" "universal" "essential-packages") | sha256sum }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# universal/essential-packages hash: {{ include (joinPath ".chezmoitemplates" "universal" "essential-packages") | sha256sum }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# universal/essential-packages hash: {{ include (joinPath ".chezmoitemplates" "universal" "essential-packages") | sha256sum }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# universal/essential-packages hash: {{ include (joinPath ".chezmoitemplates" "universal" "essential-packages") | sha256sum }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}}

View file

@ -0,0 +1,17 @@
#!/bin/sh
{{- includeTemplate "universal/logg" }}
XDG_CONFIG_HOME="$HOME/.config"
if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then
mkdir -p "${XDG_CONFIG_HOME}/age"
logg star '`PRESS ENTER` if you have not set up your encryption token yet'
age --decrypt --output "${XDG_CONFIG_HOME}/age/chezmoi.txt" "{{ .chezmoi.sourceDir }}/key.txt.age" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg info 'Proceeding without decrypting age encryption key stored at `~/.local/share/chezmoi/home/key.txt.age`'
logg info 'To have Chezmoi handle your encryption (so you can store your private files publicly) take a look at https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/#how-do-i-configure-chezmoi-to-encrypt-files-but-only-request-a-passphrase-the-first-time-chezmoi-init-is-run'
else
chmod 600 "${XDG_CONFIG_HOME}/age/chezmoi.txt"
fi
fi

View file

@ -1,15 +0,0 @@
#!/bin/sh
XDG_CONFIG_HOME="$HOME/.config"
if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then
mkdir -p "${XDG_CONFIG_HOME}/age"
echo "PRESS ENTER if you have not set up your encryption token yet"
age --decrypt --output "${XDG_CONFIG_HOME}/age/chezmoi.txt" "{{ .chezmoi.sourceDir }}/key.txt.age" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
echo "Proceeding without decrypting age encryption key stored at ~/.local/share/chezmoi/home/key.txt.age"
echo "To have Chezmoi handle your encryption (so you can store your private files publicly) take a look at https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/#how-do-i-configure-chezmoi-to-encrypt-files-but-only-request-a-passphrase-the-first-time-chezmoi-init-is-run"
else
chmod 600 "${XDG_CONFIG_HOME}/age/chezmoi.txt"
fi
fi

View file

@ -12,12 +12,12 @@ set -eufo pipefail
{{- end }} {{- end }}
# aqua.yaml.tmpl hash: {{ $files | join "" | sha256sum }} # aqua.yaml.tmpl hash: {{ $files | join "" | sha256sum }}
if ! command -v aqua >/dev/null 2>&1; then if ! command -v aqua >/dev/null 2>&1; then
logg 'Installing Aqua' logg info 'Installing Aqua'
curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v1.0.0/aqua-installer | bash curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v1.0.0/aqua-installer | bash
fi fi
logg 'Updating Aqua' logg info 'Updating Aqua'
aqua update-aqua aqua update-aqua
logg 'Installing Aqua dependencies (if any are defined)' logg info 'Installing Aqua dependencies (if any are defined)'
aqua install -a aqua install -a
{{- end }} {{- end }}

View file

@ -1,7 +1,7 @@
#!/usr/bin/env sh #!/usr/bin/env sh
{{- if false }} {{- if false }}
# {{ output "sha256sum" (joinPath .chezmoi.sourceDir "private_dot_config/crontab/config") }} # crontab config hash: {{ include (joinPath .chezmoi.homeDir ".config" "crontab" "config")| sha256sum }}
{{- includeTemplate "universal/profile" }} {{- includeTemplate "universal/profile" }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# {{ output "sha256sum" (joinPath .chezmoi.sourceDir ".chezmoidata.yaml") }} # .chezmoidata.yml hash: {{ include (joinPath .chezmoi.sourceDir ".chezmoidata.yml")| sha256sum }}
# software.yml hash: {{ include (joinPath .chezmoi.homeDir ".local" "share" "chezmoi" "software.yml")| sha256sum }}
{{- includeTemplate "universal/profile" }} {{- includeTemplate "universal/profile" }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}

View file

@ -1,11 +0,0 @@
#!/usr/bin/env bash
{{- if and false .host.headless -}}
{{- includeTemplate "universal/profile" }}
{{- includeTemplate "universal/logg" }}
logg 'Bootstrapping Z4H'
Z4H_BOOTSTRAPPING=1 exec zsh && exit 0
{{- end }}
# TODO

View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
{{- if .host.headless }}
# .zshrc hash: {{ include (joinPath .chezmoi.homeDir ".zshrc")| sha256sum }}
{{- includeTemplate "universal/profile" }}
{{- includeTemplate "universal/logg" }}
### Initialize ZSH so plugin bootstrap process is done ahead of time
if command -v zsh > /dev/null; then
logg 'Bootstrapping ZSH plugin system'
exec zsh && exit 0
fi
{{- end -}}

View file

@ -5,7 +5,7 @@
### Install Xcode CLI tools on macOS ### Install Xcode CLI tools on macOS
if [ -d /Applications ] && [ -d /Library ]; then if [ -d /Applications ] && [ -d /Library ]; then
xcode-select -p >/dev/null 2>&1 || xcode-select --install xcode-select -p >/dev/null 2>&1 || sudo xcode-select --install
fi fi
### Install Homebrew ### Install Homebrew

View file

@ -1,5 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
{{- if eq .host.distro.id "windows" }} {{- if eq .host.distro.id "windows" }}
{{- end }} {{- end }}