archx/macx.sh
2023-02-17 00:32:23 +01:00

66 lines
2 KiB
Bash

#!/bin/bash
clear
echo "macx.sh by ~zotan, bootstrapping system..."
echo
echo "--- Installing Rosetta 2 ---"
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
echo
echo "--- Installing homebrew ---"
set -e
/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)"
set +e
echo
echo "--- Downloading Brewfile ---"
mkdir -p ~/Projects
git clone https://git.ztn.sh/zotan/os-install-scripts ~/Projects/os-install-scripts
echo
echo "--- Linking to system Brewfile ---"
ln -s ~/Projects/os-install-scripts/macx-resources/Brewfile ~/.Brewfile
echo
echo "--- Running brew bundle ---"
brew bundle --global
echo
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
echo "Fixing dotnet symlink"
sudo ln -s /opt/homebrew/opt/dotnet/libexec /usr/local/share/dotnet
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
echo "Installing prezto"
curl -L share.zotan.services/prezto.sh | zsh
####
echo
echo "All done. Please reboot to make sure everything is applied."
echo
echo
echo
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"
echo
echo "Please download and install them manually."