Update 21 files
- /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_95-bootstrap-zsh-plugins.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_99-restart-gnome.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_09-node-version.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_95-bootstrap-zsh-plugins.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_99-restart-gnome.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_09-install-go.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_09-node-version.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.sh.tmpl
This commit is contained in:
parent
ec4f5b8059
commit
0ce5a3c77b
13 changed files with 101 additions and 27 deletions
|
@ -1,5 +1,10 @@
|
|||
{{- if eq .host.distro.family "linux" -}}
|
||||
#!/usr/bin/env bash
|
||||
# @file Linux Shortcut Removal
|
||||
# @brief Cleans up desktop shortcuts that are out of place or unwanted on Linux devices
|
||||
# @description
|
||||
# This script loops through the `.removeLinuxShortcuts` value in `home/.chezmoidata.yaml` and removes
|
||||
# desktop shortcuts that have been deemed to be unnecessary or obtrusive.
|
||||
|
||||
{{ $removeShortcuts := join " " .removeLinuxShortcuts }}
|
||||
# shortcuts to remove: {{ $removeShortcuts }}
|
|
@ -1,5 +1,10 @@
|
|||
{{- if (ne .host.distro.family "windows") -}}
|
||||
#!/usr/bin/env -S bash -i
|
||||
# @file Bash It!
|
||||
# @brief Ensures Bash is configured to use Bash It!
|
||||
# @description
|
||||
# This script ensures Bash is configured to use Bash It! It ensures dependencies are installed, installs completions,
|
||||
# and enables Bash It! plugins. The completions and plugins are hardcoded in this script.
|
||||
|
||||
{{ includeTemplate "universal/profile" }}
|
||||
{{ includeTemplate "universal/logg" }}
|
|
@ -0,0 +1,20 @@
|
|||
{{- if (eq .host.headless true) }}
|
||||
#!/usr/bin/env bash
|
||||
# @file ZSH Pre-Initialization
|
||||
# @brief Ensures ZSH is pre-initialized by invoking ZSH and allowing it to perform "first-run" tasks
|
||||
# @description
|
||||
# This script ensures that the first time you open a ZSH terminal session everything is loaded as fast as possible.
|
||||
# It does this by invoking ZSH in the background during the provisioning process so that "first-run" tasks such
|
||||
# as cache-building are handled ahead of time.
|
||||
|
||||
# .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 info 'Bootstrapping ZSH by running `exec zsh && exit 0`'
|
||||
exec zsh && exit 0
|
||||
fi
|
||||
{{ end -}}
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
{{- if (eq .host.headless true) }}
|
||||
|
||||
# .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 info 'Bootstrapping ZSH by running `exec zsh && exit 0`'
|
||||
exec zsh && exit 0
|
||||
fi
|
||||
{{ end }}
|
|
@ -1,4 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# @file Miscellaneous Clean Up
|
||||
# @brief Removes certain files that should not be necessary
|
||||
# @description
|
||||
# This script removes various files in the `HOME` directory that are either no longer necessary
|
||||
# or cluttery.
|
||||
|
||||
### Remove meta sudo file
|
||||
if [ -f "$HOME/.sudo_as_admin_successful" ]; then
|
|
@ -0,0 +1,24 @@
|
|||
{{- if eq .host.distro.family "linux" -}}
|
||||
#!/usr/bin/env bash
|
||||
# @file GNOME Restart
|
||||
# @brief Reloads `gnome-shell` so that the theme is properly loaded
|
||||
# @description
|
||||
# This script reloads the `gnome-shell` so that the theme is properly loaded without having to reboot. This
|
||||
# only runs when the `HEADLESS_INSTALL` variable is passed because, unless you are provisioning the session headlessly,
|
||||
# you probably want to retain the terminal window that initialized the provisioning process since it contains
|
||||
# all the logs.
|
||||
#
|
||||
# ## Logs
|
||||
#
|
||||
# Regardless of whether or not this script runs, you can access the provisioning logs by browsing through
|
||||
# `${XDG_DATA_HOME:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log`
|
||||
|
||||
### Restart GNOME if `HEADLESS_INSTALL` is defined and `gnome-shell` is available
|
||||
if [ -n "$HEADLESS_INSTALL" ] && command -v gnome-shell > /dev/null; then
|
||||
logg info 'Reloading `gnome-shell`'
|
||||
killall -3 gnome-shell
|
||||
else
|
||||
logg info 'Manually reload `gnome-shell`'
|
||||
fi
|
||||
|
||||
{{ end -}}
|
|
@ -1,13 +0,0 @@
|
|||
{{- if eq .host.distro.family "linux" -}}
|
||||
#!/usr/bin/env bash
|
||||
|
||||
### Restart GNOME
|
||||
if command -v gnome-shell > /dev/null; then
|
||||
logg info 'Manually reload `gnome-shell`'
|
||||
# logg info 'Reloading `gnome-shell`'
|
||||
# killall -3 gnome-shell
|
||||
# Disabled because it causes the terminal window with the logs to close
|
||||
# If you don't mind this, you can enable (logs are still stored at "${XDG_DATA_HOME:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log")
|
||||
fi
|
||||
|
||||
{{ end -}}
|
|
@ -1,5 +1,16 @@
|
|||
{{- if (ne .host.distro.family "windows") -}}
|
||||
#!/usr/bin/env bash
|
||||
# @file Node.js / Volta / ZX Install
|
||||
# @brief Ensures Node.js, Volta, and ZX are installed prior to Chezmoi applying the dotfile state.
|
||||
# @description
|
||||
# This script ensures required dependencies are installed. These dependencies include:
|
||||
#
|
||||
# 1. **[Node.js](https://nodejs.org/en)**: JavaScript runtime engine which is installed to ensure any user with Homebrew configured can access Node.js
|
||||
# 2. **[Volta](https://volta.sh/)**: Node.js version manager that provides the capability of automatically using `package.json` defined Node.js versions
|
||||
# 3. **[ZX](https://github.com/google/zx)**: Used for the script that installs the software packages on any OS
|
||||
#
|
||||
# The Volta setup process will ensure that the user is configured to use the latest Node.js version, by default. It then
|
||||
# also ensures the user's `~/.bashrc` and `~/.zshrc` profiles are setup for use with Volta.
|
||||
|
||||
{{ includeTemplate "universal/profile-before" }}
|
||||
{{ includeTemplate "universal/logg-before" }}
|
|
@ -1,5 +1,9 @@
|
|||
{{- if (ne .host.distro.family "windows") -}}
|
||||
#!/usr/bin/env bash
|
||||
# @file Go Install
|
||||
# @brief Ensures Go is installed via Homebrew
|
||||
# @description
|
||||
# This script ensures Go is installed. It uses Homebrew to install Go.
|
||||
|
||||
{{ includeTemplate "universal/profile-before" }}
|
||||
{{ includeTemplate "universal/logg-before" }}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{{- if (ne .host.distro.family "windows") -}}
|
||||
#!/usr/bin/env bash
|
||||
# @file Node.js Version
|
||||
# @brief Ensures a recent version of Node.js is available to the user by leveraging Volta
|
||||
# @description
|
||||
# This script installs the latest version of Node.js with Volta if the default Node.js version
|
||||
# is an outdated version.
|
||||
|
||||
# Node.js version: {{ output "node" "--version" }}
|
||||
|
|
@ -1,5 +1,10 @@
|
|||
{{- if eq .host.distro.family "linux" -}}
|
||||
#!/usr/bin/env bash
|
||||
# @file Linux Bloatware Removal
|
||||
# @brief Removes Linux bloatware defined in `.removeLinuxPackages` of the `home/.chezmoidata.yaml` file
|
||||
# @description
|
||||
# This script removes some of the software deemed to be "bloatware" by cycling through the values defined in
|
||||
# `.removeLinuxPackages` of the `home/.chezmoidata.yaml` file.
|
||||
|
||||
{{ includeTemplate "universal/profile-before" }}
|
||||
{{ includeTemplate "universal/logg-before" }}
|
|
@ -1,5 +1,16 @@
|
|||
{{- if ne .host.distro.family "windows" -}}
|
||||
#!/usr/bin/env bash
|
||||
# @file Docker Install
|
||||
# @brief Ensures Docker is installed, ensures the user can access Docker without sudo, and ensures Docker is configured to use gVisor
|
||||
# @description
|
||||
# This script ensures Docker is installed and then adds the provisioning user to the `docker` group so that they can
|
||||
# access Docker without `sudo`. It also installs and configures gVisor for use with Docker.
|
||||
#
|
||||
# ## gVisor
|
||||
#
|
||||
# gVisor is included with our Docker setup because it improves the security of Docker. gVisor is an application kernel, written in Go,
|
||||
# that implements a substantial portion of the Linux system call interface. It provides an additional layer of isolation between running
|
||||
# applications and the host operating system. It has gained a lot of attention, perhaps partly, because it is maintained by Google.
|
||||
|
||||
{{ includeTemplate "universal/profile-before" }}
|
||||
{{ includeTemplate "universal/logg-before" }}
|
|
@ -1,4 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
# @file GPG Configuration
|
||||
# @brief Imports the public GPG key defined by the variable `KEYID` and then assigns it ultimate trust
|
||||
# @description
|
||||
# This script imports your publicly hosted GPG key using `pgp.mit.edu` as the key host. It then assigns it
|
||||
# the ultimate trust level. It also downloads and configures GPG to use the configuration defined in `.config.gpg`
|
||||
# in the `home/.chezmoidata.yaml` file.
|
||||
|
||||
{{ includeTemplate "universal/profile-before" }}
|
||||
{{ includeTemplate "universal/logg-before" }}
|
Loading…
Reference in a new issue