2023-02-16 19:04:43 +01:00
|
|
|
#!/bin/bash
|
2023-02-16 22:30:53 +01:00
|
|
|
|
2023-02-17 00:20:57 +01:00
|
|
|
clear
|
|
|
|
echo "macx.sh by ~zotan, bootstrapping system..."
|
|
|
|
echo
|
|
|
|
echo "--- Installing Rosetta 2 ---"
|
|
|
|
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
|
|
|
|
|
|
|
|
echo
|
2023-02-16 19:04:43 +01:00
|
|
|
echo "--- Installing homebrew ---"
|
2023-02-16 22:30:53 +01:00
|
|
|
set -e
|
2023-02-16 19:04:43 +01:00
|
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
|
|
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
|
|
|
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
2023-02-16 22:30:53 +01:00
|
|
|
set +e
|
2023-02-16 19:04:43 +01:00
|
|
|
|
2023-02-17 00:20:57 +01:00
|
|
|
echo
|
2023-02-16 19:04:43 +01:00
|
|
|
echo "--- Downloading Brewfile ---"
|
2023-02-17 00:20:57 +01:00
|
|
|
mkdir -p ~/Projects
|
2023-02-16 22:15:43 +01:00
|
|
|
git clone https://git.ztn.sh/zotan/os-install-scripts ~/Projects/os-install-scripts
|
|
|
|
|
2023-02-17 00:20:57 +01:00
|
|
|
echo
|
2023-02-16 22:15:43 +01:00
|
|
|
echo "--- Linking to system Brewfile ---"
|
|
|
|
ln -s ~/Projects/os-install-scripts/macx-resources/Brewfile ~/.Brewfile
|
2023-02-16 19:04:43 +01:00
|
|
|
|
2023-02-17 00:20:57 +01:00
|
|
|
echo
|
2023-02-16 19:04:43 +01:00
|
|
|
echo "--- Running brew bundle ---"
|
2023-02-16 22:15:43 +01:00
|
|
|
brew bundle --global
|
2023-02-16 19:04:43 +01:00
|
|
|
|
2023-02-17 00:20:57 +01:00
|
|
|
echo
|
2023-02-16 19:04:43 +01:00
|
|
|
echo "--- Running postinstall steps ---"
|
|
|
|
echo "Configuring pinentry-mac"
|
|
|
|
mkdir -p ~/.gnupg
|
|
|
|
echo "pinentry-program /opt/homebrew/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
|
|
|
|
|
|
|
|
echo "Configuring dock autohide"
|
|
|
|
defaults write com.apple.dock autohide -int 1
|
|
|
|
defaults write com.apple.dock autohide-delay -int 0
|
|
|
|
defaults write com.apple.dock autohide-time-modifier -float 0.4
|
|
|
|
killall Dock
|
|
|
|
|
|
|
|
echo "Disabling font smoothing"
|
|
|
|
defaults -currentHost write -g AppleFontSmoothing -int 0
|
|
|
|
|
2023-02-16 19:57:57 +01:00
|
|
|
echo "Fixing dotnet symlink"
|
|
|
|
sudo ln -s /opt/homebrew/opt/dotnet/libexec /usr/local/share/dotnet
|
2023-02-16 19:04:43 +01:00
|
|
|
|
2023-02-17 00:20:57 +01:00
|
|
|
echo "Installing DNSSEC root anchor for ldns and drill"
|
|
|
|
mkdir -p /opt/homebrew/opt/ldns/etc/unbound
|
|
|
|
cp ~/Projects/macx-resources/dnssec-root.key /opt/homebrew/opt/ldns/etc/unbound/root.key
|
2023-02-16 22:15:43 +01:00
|
|
|
|
2023-02-17 00:32:23 +01:00
|
|
|
echo "Installing prezto"
|
|
|
|
curl -L share.zotan.services/prezto.sh | zsh
|
|
|
|
|
2023-02-16 19:04:43 +01:00
|
|
|
####
|
|
|
|
echo
|
2023-02-17 00:20:57 +01:00
|
|
|
echo "All done. Please reboot to make sure everything is applied."
|
2023-02-16 22:15:43 +01:00
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|
2023-02-17 00:20:57 +01:00
|
|
|
echo "iOS applications not installed automatically: bunq"
|
|
|
|
echo "Other applications not installed automatically: Amphetamine Enhancer, Capture One, u-he hive, Arturia Software Center"
|
|
|
|
echo "Setapp applications not installed automatically: TablePlus, Jump Desktop, RapidAPI, WiFi Explorer, Archiver, Proxyman"
|
2023-02-16 22:15:43 +01:00
|
|
|
echo
|
2023-02-17 00:20:57 +01:00
|
|
|
echo "Please download and install them manually."
|