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:
parent
1721d8e279
commit
a79c561e8d
17 changed files with 62 additions and 15 deletions
|
@ -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
|
|
@ -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"'`'
|
||||
|
|
|
@ -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"'`'
|
||||
|
|
|
@ -3,19 +3,29 @@
|
|||
{{ 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
|
||||
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://shorturl.at/jkpzG'
|
||||
logg info 'Removing all files that begin with encrypted_ because decryption failed'
|
||||
find "$HOME/.local/share/chezmoi" -type f -name "encrypted_*" | while read ENCRYPTED_FILE; do
|
||||
logg info "Removing $ENCRYPTED_FILE"
|
||||
rm -f "$ENCRYPTED_FILE"
|
||||
done
|
||||
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=$?
|
||||
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://shorturl.at/jkpzG'
|
||||
logg info 'Removing all files that begin with encrypted_ because decryption failed'
|
||||
find "$HOME/.local/share/chezmoi" -type f -name "encrypted_*" | while read ENCRYPTED_FILE; do
|
||||
logg info "Removing $ENCRYPTED_FILE"
|
||||
rm -f "$ENCRYPTED_FILE"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- $packages := list
|
||||
"age"
|
||||
"base-devel"
|
||||
"ccid"
|
||||
"hopenpgp-tools"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- $packages := list
|
||||
"age/bullseye-backports"
|
||||
"build-essential"
|
||||
"gnupg-agent"
|
||||
"hopenpgp-tools"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- $packages := list
|
||||
"age"
|
||||
"gcc"
|
||||
"gcc-c++"
|
||||
"gnupg2-smime"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- $packages := list
|
||||
"age"
|
||||
"gcc"
|
||||
"gcc-c++"
|
||||
"kernel-devel"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- $packages := list
|
||||
"age"
|
||||
"bash"
|
||||
"nodejs"
|
||||
"npm"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{- $packages := list
|
||||
"age"
|
||||
"build-essential"
|
||||
"gnupg-agent"
|
||||
"hopenpgp-tools"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{{/* bison required for ASDF PHP installation */}}
|
||||
{{- $packages := list
|
||||
"age"
|
||||
"bash"
|
||||
"bison"
|
||||
"coreutils"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue