Update 22 files

- /home/.chezmoiscripts/_universal/run_onchange_before_11-install-docker.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_05-install-homebrew.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_08-install-zx.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_09-ensure-node-version.tmpl
- /home/.chezmoiscripts/universal/run_before_01-decrypt-age-key.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_05-install-homebrew.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_09-ensure-node-version.tmpl
- /home/.chezmoiscripts/centos/run_onchange_before_10-install-centos-dependencies.tmpl
- /home/.chezmoiscripts/centos/run_onchange_before_05-upgrade.tmpl
- /home/.chezmoiscripts/fedora/run_onchange_before_10-install-fedora-dependencies.tmpl
- /home/.chezmoitemplates/universal/common-dependencies
- /home/.chezmoitemplates/universal/profile-inline
- /home/.chezmoitemplates/ubuntu/common-dependencies
- /home/.chezmoitemplates/opensuse/common-dependencies
- /home/.chezmoitemplates/freebsd/common-dependencies
- /home/.chezmoitemplates/fedora/common-dependencies
- /home/.chezmoitemplates/debian/common-dependencies
- /home/.chezmoitemplates/archlinux/common-dependencies
This commit is contained in:
Brian Zalewski 2023-01-31 05:43:15 +00:00
parent 1721d8e279
commit a79c561e8d
17 changed files with 62 additions and 15 deletions

View file

@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Source: https://www.linuxcapable.com/how-to-install-epel-on-centos-stream/
{{ includeTemplate "universal/logg-before" }}
### Upgrade system
logg info 'Upgrade system'
sudo dnf upgrade --refresh
### Enable CRB
logg info 'Ensure the CRB repository is activated'
sudo dnf config-manager --set-enabled crb
### Add EPEL
if ! dnf repolist | grep 'epel ' > /dev/null; then
logg info 'Adding the EPEL repository'
. /etc/os-release
sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION}.noarch.rpm"
fi
### Add EPEL Next
if ! dnf repolist | grep 'epel-next' > /dev/null; then
logg info 'Adding the EPEL Next repository'
. /etc/os-release
sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-${VERSION}.noarch.rpm"
else
logg info 'EPEL Next repository already enabled (EPEL compatibility for CentOS)'
fi

View file

@ -23,7 +23,7 @@ logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install packages if they are not already present
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Checking for presence of `'"$PACKAGE"'`'
if rpm -qa | grep "$PACKAGE" > /dev/null; then
if rpm -qa | grep "^$PACKAGE-" > /dev/null; then
logg info 'The '"$PACKAGE"' package is already installed'
else
logg info 'Installing `'"$PACKAGE"'`'

View file

@ -16,7 +16,7 @@ logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install packages if they are not already present
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Checking for presence of `'"$PACKAGE"'`'
if rpm -qa | grep "$PACKAGE" > /dev/null; then
if rpm -qa | grep "^$PACKAGE-" > /dev/null; then
logg info 'The '"$PACKAGE"' package is already installed'
else
logg info 'Installing `'"$PACKAGE"'`'

View file

@ -3,8 +3,17 @@
{{ includeTemplate "universal/logg-before" }}
{{ includeTemplate "universal/profile-before" }}
### Install Age via Homebrew if not present
if ! command -v age > /dev/null; then
if command -v brew > /dev/null; then
brew install age
else
logg warn '`age` is not installed which is utilized in the decryption process'
fi
### Decrypt private key if it is not already present
if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then
if command -v age > /dev/null; then
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=$?
@ -17,6 +26,7 @@ if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then
rm -f "$ENCRYPTED_FILE"
done
fi
fi
fi
### Ensure proper permissions on private key

View file

@ -1,4 +1,5 @@
{{- $packages := list
"age"
"base-devel"
"ccid"
"hopenpgp-tools"

View file

@ -1,4 +1,5 @@
{{- $packages := list
"age/bullseye-backports"
"build-essential"
"gnupg-agent"
"hopenpgp-tools"

View file

@ -1,4 +1,5 @@
{{- $packages := list
"age"
"gcc"
"gcc-c++"
"gnupg2-smime"

View file

@ -1,4 +1,5 @@
{{- $packages := list
"age"
"gcc"
"gcc-c++"
"kernel-devel"

View file

@ -1,4 +1,5 @@
{{- $packages := list
"age"
"bash"
"nodejs"
"npm"

View file

@ -1,4 +1,5 @@
{{- $packages := list
"age"
"build-essential"
"gnupg-agent"
"hopenpgp-tools"

View file

@ -1,6 +1,5 @@
{{/* bison required for ASDF PHP installation */}}
{{- $packages := list
"age"
"bash"
"bison"
"coreutils"

View file

@ -27,5 +27,9 @@ elif [ -f "/opt/homebrew/bin/brew" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
### Volta
export VOLTA_HOME="$XDG_DATA_HOME/volta"
export PATH="$VOLTA_HOME/bin:$PATH"
### Ensure ~/.local/bin in PATH
export PATH="$HOME/.local/bin:$PATH"