mirror of
https://github.com/tommytran732/macOS-Setup-Script
synced 2024-11-22 09:51:33 -05:00
Compare commits
5 Commits
653d53cc02
...
9142b9cd72
Author | SHA1 | Date | |
---|---|---|---|
9142b9cd72 | |||
6261bd3d17 | |||
8c75440601 | |||
60f055696d | |||
0481c411be |
@ -1,16 +0,0 @@
|
|||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
# Comment this line out if you don't have Touch ID
|
|
||||||
awk 'NR==2 {print "auth sufficient pam_tid.so"} 1' /etc/pam.d/sudo | sudo tee /etc/pam.d/sudo
|
|
||||||
|
|
||||||
# Protect Home
|
|
||||||
for user in $(ls /Users | grep -v 'Shared'); do
|
|
||||||
sudo chmod 700 /Users/$user
|
|
||||||
done
|
|
||||||
|
|
||||||
# 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
|
|
@ -23,9 +23,24 @@ echo "export HOMEBREW_NO_ANALYTICS=1" | sudo tee -a /etc/zshrc
|
|||||||
export HOMEBREW_NO_ANALYTICS=1
|
export HOMEBREW_NO_ANALYTICS=1
|
||||||
brew tap homebrew/autoupdate
|
brew tap homebrew/autoupdate
|
||||||
brew tap homebrew/cask-versions
|
brew tap homebrew/cask-versions
|
||||||
brew install --cask android-platform-tools chronycontrol github gpg-suite-no-mail microsoft-edge mullvadvpn orbstack powershell visual-studio-code
|
brew install --cask android-platform-tools chronycontrol github gpg-suite-no-mail ivpn microsoft-edge orbstack powershell visual-studio-code
|
||||||
brew install gnu-sed
|
brew install gnu-sed
|
||||||
echo 'PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"' | sudo tee -a /etc/zshrc
|
echo 'PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"' | sudo tee -a /etc/zshrc
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
#Install Rosetta
|
#Install Rosetta
|
||||||
softwareupdate --install-rosetta
|
softwareupdate --install-rosetta
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
sudo launchctl load /Library/LaunchDaemons/io.tommytran.prefs.plist
|
16
etc/Library/LaunchDaemons/io.tommytran.prefs.plist
Normal file
16
etc/Library/LaunchDaemons/io.tommytran.prefs.plist
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Label</key>
|
||||||
|
<string>io.tommytran.prefs</string>
|
||||||
|
<key>RunAtLoad</key>
|
||||||
|
<true/>
|
||||||
|
<key>LaunchOnlyOnce</key>
|
||||||
|
<true/>
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<string>/Library/Tomster Corporation/scripts/apply_prefs.sh</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
4
etc/Library/Tomster Corporation/scripts/apply_prefs.sh
Normal file
4
etc/Library/Tomster Corporation/scripts/apply_prefs.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
/bin/sleep 5
|
||||||
|
/bin/cp -r '/Library/Tomster Corporation/prefs/' '/Library/Managed Preferences/'
|
27
primary.sh
Normal file
27
primary.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# Comment this line out if you don't have Touch ID
|
||||||
|
awk 'NR==2 {print "auth sufficient pam_tid.so"} 1' /etc/pam.d/sudo | sudo tee /etc/pam.d/sudo
|
||||||
|
|
||||||
|
# Protect Home
|
||||||
|
for user in $(ls /Users | grep -v 'Shared'); do
|
||||||
|
sudo chmod 700 /Users/$user
|
||||||
|
done
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
sudo launchctl load /Library/LaunchDaemons/io.tommytran.prefs.plist
|
Loading…
Reference in New Issue
Block a user