2023-11-03 07:49:00 -04:00
|
|
|
#!/bin/zsh
|
2024-04-09 04:06:43 -04:00
|
|
|
# shellcheck disable=SC1071
|
2023-11-03 07:49:00 -04:00
|
|
|
|
2023-11-07 03:42:21 -05:00
|
|
|
# Comment this line out if you don't have Touch ID
|
2023-11-03 07:49:00 -04:00
|
|
|
awk 'NR==2 {print "auth sufficient pam_tid.so"} 1' /etc/pam.d/sudo | sudo tee /etc/pam.d/sudo
|
|
|
|
|
2023-11-11 16:51:43 -05:00
|
|
|
# Protect Home
|
2023-11-13 15:22:32 -05:00
|
|
|
for user in $(ls /Users | grep -v 'Shared'); do
|
2024-06-26 02:35:51 -04:00
|
|
|
sudo chmod 700 /Users/"$user"
|
2023-11-13 15:22:32 -05:00
|
|
|
done
|
2023-11-11 16:51:43 -05:00
|
|
|
|
2023-11-03 07:49:00 -04:00
|
|
|
# Verify SSH Fingerprints
|
|
|
|
echo "VerifyHostKeyDNS yes" | sudo tee /etc/ssh/ssh_config.d/10-custom.conf
|
|
|
|
sudo chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
|
|
|
|
|
|
|
#Enable Safari debug menu
|
|
|
|
defaults write com.apple.Safari IncludeInternalDebugMenu 1
|
|
|
|
|
2023-12-24 05:39:28 -05:00
|
|
|
#Install Brew
|
2023-11-03 07:49:00 -04:00
|
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
2023-12-24 02:10:11 -05:00
|
|
|
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/$(USERS)/.zprofile
|
|
|
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
2023-12-24 02:11:33 -05:00
|
|
|
echo "export HOMEBREW_NO_ANALYTICS=1" | sudo tee -a /etc/zshrc
|
2023-12-24 02:10:11 -05:00
|
|
|
export HOMEBREW_NO_ANALYTICS=1
|
2023-11-03 18:37:39 -04:00
|
|
|
brew tap homebrew/autoupdate
|
|
|
|
brew tap homebrew/cask-versions
|
2024-01-20 02:19:04 -05:00
|
|
|
brew install --cask android-platform-tools chronycontrol github gpg-suite-no-mail ivpn microsoft-edge orbstack powershell visual-studio-code
|
2023-11-07 03:39:44 -05:00
|
|
|
brew install gnu-sed
|
2023-12-24 02:11:33 -05:00
|
|
|
echo 'PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"' | sudo tee -a /etc/zshrc
|
2023-12-24 05:39:28 -05:00
|
|
|
|
2024-01-20 02:21:09 -05:00
|
|
|
# Configure chronyd
|
|
|
|
curl https://raw.githubusercontent.com/TommyTran732/macOS-Setup-Script/main/etc/chrony.d/chrony.conf | sudo tee /etc/chrony.d/chrony.conf
|
|
|
|
sudo chmod 644 /etc/chrony.d/chrony.conf
|
|
|
|
|
2023-12-24 05:39:28 -05:00
|
|
|
#Install Rosetta
|
|
|
|
softwareupdate --install-rosetta
|
2024-01-20 02:36:00 -05:00
|
|
|
|
|
|
|
umask 022
|
|
|
|
|
|
|
|
# Setup Edge Enterprise Policies
|
|
|
|
sudo mkdir -p '/Library/Tomster Corporation/scripts/' '/Library/Tomster Corporation/prefs/' '/Library/Managed Preferences'
|
|
|
|
curl https://raw.githubusercontent.com/TommyTran732/macOS-Setup-Script/etc/Library/Tomster%20Corporation/apply_prefs.sh | sudo tee '/etc/Library/Tomster Corporation/apply_prefs.sh'
|
|
|
|
sudo chmod 744 '/Library/Tomster Corporation/scripts/apply_prefs.sh'
|
|
|
|
curl https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/macOS/Managed%20Preferences/com.microsoft.Edge.plist | sudo tee '/Library/Tomster Corporation/prefs/com.microsoft.Edge.plist'
|
|
|
|
curl https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/macOS/Preferences/com.microsoft.Edge.plist | sudo tee /Library/Preferences/com.microsoft.Edge.plist
|
2024-01-20 02:38:18 -05:00
|
|
|
curl https://raw.githubusercontent.com/TommyTran732/macOS-Setup-Script/main/etc/Library/LaunchDaemons/io.tommytran.prefs.plist | sudo tee /etc/Library/LaunchDaemons/io.tommytran.prefs.list
|
2024-04-09 04:12:58 -04:00
|
|
|
sudo launchctl load -w /Library/LaunchDaemons/io.tommytran.prefs.plist
|