This commit is contained in:
Brian Zalewski 2023-12-06 02:50:29 +00:00
parent e12fb48312
commit 38341af5f0
9 changed files with 90 additions and 45 deletions

View file

@ -579,7 +579,6 @@ softwareGroups:
- eul - eul
- firefox - firefox
- flow-launcher - flow-launcher
- fonts
- gnome - gnome
- iina - iina
- kvantum - kvantum

View file

@ -36,5 +36,16 @@ ensureFullDiskAccess() {
fi fi
} }
# @description Applies changes that require input from the user such as using Touch ID on macOS when
# importing certificates into the system keychain.
#
# * Ensures CloudFlare Teams certificate is imported into the system keychain
importCloudFlareCert() {
if [ -d /Applications ] && [ -d /System ] && [ -z "$HEADLESS_INSTALL" ]; then
logg info 'Importing Cloudflare_CA.crt into System.keychain' && sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "$HOME/.local/etc/ssl/cloudflare/Cloudflare_CA.crt"
fi
}
printFullDiskAccessNotice printFullDiskAccessNotice
ensureFullDiskAccess ensureFullDiskAccess
importCloudFlareCert

View file

@ -20,7 +20,7 @@ if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then
logg info 'Sourcing asdf.sh' logg info 'Sourcing asdf.sh'
. ${ASDF_DIR}/asdf.sh . ${ASDF_DIR}/asdf.sh
cat .tool-versions | while read TOOL; do cat .tool-versions | while read TOOL; do
logg info 'Installing ASDF plugin '"$(echo "$TOOL" | sed 's/ .*//')"'' && asdf plugin add "$(echo "$TOOL" | sed 's/ .*//')" > /dev/null && logg success "Successfully added $(echo "$TOOL" | sed 's/ .*//') via ASDF" logg info 'Installing ASDF plugin '"$(echo "$TOOL" | sed 's/ .*//')"'' && asdf plugin add "$(echo "$TOOL" | sed 's/ .*//')" > /dev/null && logg info "Successfully added $(echo "$TOOL" | sed 's/ .*//') via ASDF"
done done
# Only proceed with installation if either DEBUG_MODE is enabled or ~/.cache/megabyte-labs/asdf-install is missing # Only proceed with installation if either DEBUG_MODE is enabled or ~/.cache/megabyte-labs/asdf-install is missing
# Added to save time between tests because PHP takes awhile to install # Added to save time between tests because PHP takes awhile to install

View file

@ -106,10 +106,10 @@ fi
if [ -d /System ] && [ -d /Applications ] && command -v warp-cli > /dev/null; then if [ -d /System ] && [ -d /Applications ] && command -v warp-cli > /dev/null; then
### Ensure certificate installed on macOS ### Ensure certificate installed on macOS
if [ -z "$SSH_CONNECTION" ]; then if [ -z "$SSH_CONNECTION" ]; then
if [ -z "$HEADLESS_INSTALL" ]; then # if [ -z "$HEADLESS_INSTALL" ]; then
logg info '**macOS Manual Security Permission** Requesting security authorization for Cloudflare trusted certificate' # logg info '**macOS Manual Security Permission** Requesting security authorization for Cloudflare trusted certificate'
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "$HOME/.local/etc/ssl/cloudflare/Cloudflare_CA.crt" # sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "$HOME/.local/etc/ssl/cloudflare/Cloudflare_CA.crt"
fi # fi
logg info 'Updating the OpenSSL CA Store to include the Cloudflare certificate' logg info 'Updating the OpenSSL CA Store to include the Cloudflare certificate'
echo | sudo tee -a /etc/ssl/cert.pem < "$HOME/.local/etc/ssl/cloudflare/Cloudflare_CA.pem" > /dev/null echo | sudo tee -a /etc/ssl/cert.pem < "$HOME/.local/etc/ssl/cloudflare/Cloudflare_CA.pem" > /dev/null
echo "" | sudo tee -a /etc/ssl/cert.pem echo "" | sudo tee -a /etc/ssl/cert.pem

View file

@ -18,5 +18,8 @@ shell = "bash"
# [plugins.sheldon] # [plugins.sheldon]
# inline = 'sheldon() { sheldon completions --shell bash }' # inline = 'sheldon() { sheldon completions --shell bash }'
[plugins.ngrok]
inline = 'ngrok() { ngrok completions }'
[plugins.wp] [plugins.wp]
remote = "https://raw.githubusercontent.com/wp-cli/wp-cli/v2.7.1/utils/wp-completion.bash" remote = "https://raw.githubusercontent.com/wp-cli/wp-cli/v2.7.1/utils/wp-completion.bash"

View file

@ -219,6 +219,7 @@ print_banner() {
### Information section ### Information section
if command -v neofetch > /dev/null; then if command -v neofetch > /dev/null; then
printf "\\n"
neofetch neofetch
else else
## non-neofetch ## non-neofetch

View file

@ -1635,16 +1635,16 @@ async function updateService(service) {
log('info', logStage, `There was an error starting / enabling the ${service} service with systemd`) log('info', logStage, `There was an error starting / enabling the ${service} service with systemd`)
try { try {
if (brew) { if (brew) {
if (typeof brew === 'object' && brew.length) { if (typeof service === 'array') {
brew.forEach(x => { service.forEach(x => {
runCommand(`Starting / enabling object array ${service} with Homebrew`, `${x.sudo ? 'sudo brew' : 'brew'} services start ${x.name}`) runCommand(`Starting / enabling object array ${x.name} with Homebrew`, `${x.sudo ? 'sudo brew' : 'brew'} services restart ${x.name}`)
log('success', logStage, `Started / enabled the ${x.name} service with Homebrew`) log('success', logStage, `Started / enabled the ${x.name} service with Homebrew`)
}) })
} else if (typeof brew === 'object') { } else if (typeof service === 'object') {
runCommand(`Starting / enabling object ${service} with Homebrew`, `${brew.sudo ? 'sudo brew' : 'brew'} services start ${brew.name}`) runCommand(`Starting / enabling object ${service.name} with Homebrew`, `${service.sudo ? 'sudo brew' : 'brew'} services restart ${service.name}`)
log('success', logStage, `Started / enabled the ${brew.name} service with Homebrew`) log('success', logStage, `Started / enabled the ${service.name} service with Homebrew`)
} else { } else {
runCommand(`Starting / enabling ${service} with Homebrew`, `brew services start ${service}`) runCommand(`Starting / enabling ${service} with Homebrew`, `brew services restart ${service}`)
log('success', logStage, `Started / enabled the ${service} service with Homebrew`) log('success', logStage, `Started / enabled the ${service} service with Homebrew`)
} }
} else { } else {
@ -1669,8 +1669,18 @@ async function updateService(service) {
const brew = which.sync('brew', { nothrow: true }) const brew = which.sync('brew', { nothrow: true })
if (brew) { if (brew) {
try { try {
runCommand(`Starting / enabling ${service} with Homebrew`, `brew services start ${service}`) if (typeof service === 'array') {
log('success', logStage, `Started / enabled the ${service} service with Homebrew`) service.forEach(x => {
runCommand(`Starting / enabling object array ${x.name} with Homebrew`, `${x.sudo ? 'sudo brew' : 'brew'} services restart ${x.name}`)
log('success', logStage, `Started / enabled the ${x.name} service with Homebrew`)
})
} else if (typeof service === 'object') {
runCommand(`Starting / enabling object ${service.name} with Homebrew`, `${service.sudo ? 'sudo brew' : 'brew'} services restart ${service.name}`)
log('success', logStage, `Started / enabled the ${service.name} service with Homebrew`)
} else {
runCommand(`Starting / enabling ${service} with Homebrew`, `brew services restart ${service}`)
log('success', logStage, `Started / enabled the ${service} service with Homebrew`)
}
} catch (e) { } catch (e) {
log('error', logStage, `There was an error starting / enabling the ${service} Homebrew service`) log('error', logStage, `There was an error starting / enabling the ${service} Homebrew service`)
console.error(e) console.error(e)

View file

@ -1255,7 +1255,9 @@ softwarePackages:
_bin: openssl-osx-ca _bin: openssl-osx-ca
_github: https://github.com/raggi/openssl-osx-ca _github: https://github.com/raggi/openssl-osx-ca
_name: OpenSSL macOS CA _name: OpenSSL macOS CA
_service:brew:darwin: openssl-osx-ca _service:brew:darwin:
- name: openssl-osx-ca
sudo: true
_serviceEnabled: true _serviceEnabled: true
brew:darwin: raggi/ale/openssl-osx-ca brew:darwin: raggi/ale/openssl-osx-ca
meta-package-manager: meta-package-manager:
@ -1973,7 +1975,9 @@ softwarePackages:
_service:apt: clamav-freshclam _service:apt: clamav-freshclam
_service:dnf: clamd-freshclam _service:dnf: clamd-freshclam
_service:pacman: clamav-freshclam _service:pacman: clamav-freshclam
_service:brew: clamav _service:brew:
- name: clamav
sudo: true
_serviceEnabled: true _serviceEnabled: true
apt: apt:
- clamav - clamav
@ -3593,30 +3597,6 @@ softwarePackages:
_name: fm _name: fm
github: github.com/mistakenelf/fm github: github.com/mistakenelf/fm
go: github.com/mistakenelf/fm@latest go: github.com/mistakenelf/fm@latest
fonts:
_deps:
- font-sfmono-nerd-font
- font-hack-nerd-font
- font-meslo-nerd-font
_bin: false
font-sfmono-nerd-font:
_bin: false
_github: null
_name: Nerd Font
_when:cask: '! brew list font-sf-mono-nerd-font'
cask: epk/epk/font-sf-mono-nerd-font
font-hack-nerd-font:
_bin: false
_github: null
_name: Hack Nerd Font
_when:cask: '! brew list font-hack-nerd-font'
cask: font-hack-nerd-font
font-meslo-nerd-font:
_bin: false
_github: null
_name: Meslo Nerd Font
_when:cask: '! brew list font-meslo-lg-nerd-font'
cask: font-meslo-lg-nerd-font
metasploit: metasploit:
_github: https://github.com/rapid7/metasploit-framework _github: https://github.com/rapid7/metasploit-framework
_name: Metasploit Framework _name: Metasploit Framework
@ -5862,6 +5842,7 @@ softwarePackages:
_github: https://github.com/mpv-player/mpv _github: https://github.com/mpv-player/mpv
_name: MPV _name: MPV
_todo: This software does not run on macOS versions other than Mojave, Catalina, Big Sur and Ventura --- probably adding support - this issue will likely fix itself _todo: This software does not run on macOS versions other than Mojave, Catalina, Big Sur and Ventura --- probably adding support - this issue will likely fix itself
_app: mpv.app
brew: mpv brew: mpv
cask: mpv cask: mpv
choco: mpv choco: mpv
@ -6459,8 +6440,22 @@ softwarePackages:
_home: https://www.netdata.cloud/ _home: https://www.netdata.cloud/
_name: Netdata _name: Netdata
_groups: _groups:
- netdata - netdataif (typeof service === 'object' && brew.length) {
brew.forEach(x => {
runCommand(`Starting / enabling object array ${x.name} with Homebrew`, `${x.sudo ? 'sudo brew' : 'brew'} services start ${x.name}`)
log('success', logStage, `Started / enabled the ${x.name} service with Homebrew`)
})
} else if (typeof service === 'object') {
runCommand(`Starting / enabling object ${service.name} with Homebrew`, `${service.sudo ? 'sudo brew' : 'brew'} services start ${service.name}`)
log('success', logStage, `Started / enabled the ${service.name} service with Homebrew`)
} else {
runCommand(`Starting / enabling ${service} with Homebrew`, `brew services start ${service}`)
log('success', logStage, `Started / enabled the ${service} service with Homebrew`)
}
_service: netdata _service: netdata
_service:brew:
- name: netdata
sudo: true
_serviceEnabled: true _serviceEnabled: true
_deps: _deps:
- debsecan - debsecan
@ -7678,7 +7673,9 @@ softwarePackages:
- protonvpn - protonvpn
yay: protonvpn yay: protonvpn
protonvpn-cli: protonvpn-cli:
# TODO - Add seperate entry for openvpn (sudo brew services start openvpn) _deps:script:darwin:
- dialog
- openvpn
_bin: protonvpn _bin: protonvpn
_desc: The ProtonVPN CLI official release for Linux along with an unofficial ProtonVPN CLI for macOS _desc: The ProtonVPN CLI official release for Linux along with an unofficial ProtonVPN CLI for macOS
_docs: null _docs: null
@ -7689,7 +7686,30 @@ softwarePackages:
apt: protonvpn-cli apt: protonvpn-cli
dnf: protonvpn-cli dnf: protonvpn-cli
pacman: protonvpn-cli pacman: protonvpn-cli
script:darwin: brew install openvpn dialog python3 || true && sudo rm -rf /usr/local/src/protonvpn-cli && sudo git clone https://github.com/phx/protonvpn-cli-macos /usr/local/src/protonvpn-cli && cd /usr/local/src/protonvpn-cli && pip3 install -r requirements.txt && sudo python3 setup.py install script:darwin: |
sudo rm -rf /usr/local/src/protonvpn-cli
sudo git clone https://github.com/phx/protonvpn-cli-macos /usr/local/src/protonvpn-cli
cd /usr/local/src/protonvpn-cli && pip3 install -r requirements.txt
sudo python3 setup.py install
openvpn:
_bin: openvpn
_github: https://github.com/OpenVPN/openvpn
_name: OpenVPN
apt: openvpn
dnf: openvpn
pacman: openvpn
choco: openvpn
brew: openvpn
dialog:
_bin: dialog
_github: false
_home: https://invisible-island.net/dialog/
_name: Dialog
apt: dialog
dnf: dialog
pacman: dialog
choco: dialog
brew: dialog
protonmail-bridge: protonmail-bridge:
_bin: protonmail-bridge _bin: protonmail-bridge
_app: Proton Mail Bridge.app _app: Proton Mail Bridge.app
@ -9643,11 +9663,12 @@ softwarePackages:
_github: https://github.com/tfutils/tfenv _github: https://github.com/tfutils/tfenv
_home: https://github.com/tfutils/tfenv _home: https://github.com/tfutils/tfenv
_name: tfenv _name: tfenv
_post: if ! command -v terraform > /dev/null; then tfenv use latest; fi _post: tfenv use latest
ansible:darwin: professormanhattan.tfenv ansible:darwin: professormanhattan.tfenv
ansible:linux: professormanhattan.tfenv ansible:linux: professormanhattan.tfenv
brew: tfenv brew: tfenv
port: tfenv port: tfenv
yay: tfenv
alda: alda:
_bin: alda _bin: alda
_github: https://github.com/alda-lang/alda _github: https://github.com/alda-lang/alda