Eventually publishing mac-setup and dotfiles
Starting with a brand new macOS:
- Make sure to be connected to a wifi network (or LAN)
- Configure TouchID when setting up
- Login to iCloud (but may skip photos) and activate Documents Sync
- Open Terminal.app
This will do the very first steps for a new machine. The sudo password will be required. The command line tools, homebrew and fish shell will be installed.
curl -sSL https://raw.githubusercontent.com/weiland/mac-setup/main/install | sh
Install all software, casks, fonts and mac app store apps.
# checkout Brewfile
vim Brewfile
# brewing
brew bundle
for macOS as multi-user
sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
or with fish:
sh ( curl -L https://nixos.org/nix/install | psub ) --darwin-use-unencrypted-nix-store-volume --daemon
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
mv /etc/nix/nix.conf /etc/nix/nix.conf.before-nix-darwin
./result/bin/darwin-installer
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
Add home-manager to ~/.nixpkgs/darwin-configuration.nix
imports = [ <home-manager/nix-darwin> ];
sh dotfiles.sh
Compare with it's original and review the settings in there.
History of .macos
(last checked/updated 22. June 2021)
sh macos.sh
Since macos.sh
cannot catch everything...
# Adjust Notification Center
#defaults read com.apple.notificationcenterui
# Set the right resolution (Default 1440x877 on MBP 13")
defaults write com.apple.systempreferences "NSWindow Frame Main Window Frame SystemPreferencesApp 8.0" -string "105 339 668 462 0 0 1440 877 "
# and for the display
defaults write com.apple.systempreferences "NSWindow Frame Main Window Frame SystemPreferencesApp 8.0" -string "256 121 668 658 0 0 2560 1415"
- enable umlauts via karabiner elements
- import config file
- make alt key working
mkdir ~/.local/share/nvim/plugged
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
nvim +PlugInstall +qa
# spell checking
mkdir -p ~/.local/share/nvim/site/spell
mkdir -p ~/.local/share/nvim/undo
defaults write net.sf.Jumpcut launchOnStartup -bool true
defaults write net.sf.Jumpcut launchOnLogin -bool true
# does not work yet (set cmd+B as hotkey)
defaults write net.sf.Jumpcut mainHotkey -dict characters b charactersIgnoringModifiers b keyCode 11 modifierFlags 1048576
defaults write org.shiftitapp.ShiftIt shiftItshowMenu -bool false
mkdir ~/.local/share/volta
Export volta's new home globally and
append volta's bin to global fish user path in config.fish
:
set -gx VOLTA_HOME ~/.local/share/volta
fish_add_path -ga $VOLTA_HOME/bin
brew install volta
- Disable TouchBar as default
- Remove Siri from TouchBar (replace with Do-Not-Disturb)
- Map fn to show F keys
- (Re-map Capslock) Map paragraph/plus-minus to ESC
- Login and import my Vault
- import config (mostly for umlauts and mapping ESC)
- Allow all access
- Login to iCloud with App password
- Disable Calendar Notifications
- Add Exchange accounts with public folders
- show paths
- remove labels
- add home
- add sidebar items
- Open Safari and login to GitHub and Instapaper
- login to private and work accounts
- Login
- Login
- login to all accounts
- Enable encrypted backups
- Add excluded items
- fish history
- rupa-z/zoxide history (if nothing big has been changed)
- TimeMachine Exclude list
rsync -av '/Volumes/Backup/data' ~/whereever
sh update.sh
- Make sure TimeMachine backup did work properly
- Restart and press
Commmand + Shift + R
- Use Recovery Disk to download and install new Mac OS
- On first boot: Hold
Command + Option + P + R
to clear NVRAM