Setup a Mac with an Apple silicon CPU. This was tested on M1 MacBook Pro.
Possible Guide: How to Set up an Apple Mac for Software Development
- Startup, connect to WiFi (or some way to internet)
- Create Device User & Login (username, password to unlock); Create or Login Apple ID.
- Apple ID required for recovery & some installs.
- Enable File Vault; Also, Time Machine Backups settings as desired.
- Optional from above Possible Guide: Securing the Safari Browser, Security & Privacy, Spotlight.
- Decide on directory for '.' files and dotfiles repo -- Possibly prepending source command.
- Example: use destination directory
~/dotsand place repo in~/dot_src--ZDOTDIR="$HOME/dots" && DOTFILEDIR="$HOME/dot_src" && source pre_install_env.shWill place~/dot_srcfor repo and~/dots/.zshrc,~/dots/.zshenv, etc for setup files.
- Example: use destination directory
- Get a local copy of
pre_install_env.shfile (by git clone, or simply copy & paste) - Set some pre-install env variables with
pre_install_env.sh: - Install Xcode by cli or App Store
- Install Homebrew; Update homebrew, xcode CLI, path
- Install Bash; Upgrade to get Associative Arrays
- Install Git (updated compared to one automatically in MacOS and Xcode).
- Install shellcheck
- Install pre-commit
- Install NeoVim
- Install iTerm2
- Install pygments (python colorizing) or 'chroma'
- Add upgraded bash (/opt/homebrew/bin/bash) to allowed shells (/private/etc/shells)
- enable bash completions (while using zsh).
- Download & run Oh-My-Zsh install (into .config directory, assuming
pre_install_env.shworked) - Get and use settings from dotfiles repo with
get_dotfiles.sh- Uses git to clone
$DOTFILEREPO into $ {DOTFILEDIR:-$HOME/dotfiles} directory. - The default for DOTFILEREPO is dotfiles
- Can override. e.g.
typeset DOTFILEREPO="https://repo-url.com/path/to/repo" - Also clones sub-modules and updates them.
- Copies zsh config files:
- from ${SHELLDIR:-$HOME/dotfiles/shell}/{{name}} to ${ZDOTDIR:-$HOME}/.{{name}}
- for each 'name' of files: zshenv zprofile zshrc zlogin
- Uses git to clone
Open terminal and execute commands:
source pre_install_env.sh
xcode-select —-install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew doctor
brew update
brew install bash shellcheck pre-commit neovim pygments
brew install --cask iterm2
echo "/opt/homebrew/bin/bash" | sudo tee -a /private/etc/shells
autoload bashcompinit && bashcompinit
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
source get_dotfiles.sh- Consider using GitHub's credential manager
- GitCredentialManager
- likely fine using osX default:
credential.helper=osxkeychain
- Shutdown terminal app and restart to use the new zsh initialization files.
- Open another shell tab in iTerm2; install p10k recommended font.
- Follow instructions for font install. Other p10k settings already in dotfiles configuration.
Decide which of the following needed, and install as desired:
- Visual Studio Code
- Or instead - VSCodium replace with
brew install --cask vscodium - May need to install font for vs-code terminal to match font installed by p10k.
- Or instead - VSCodium replace with
- Ruby Development updates and tools (used by MacOS a lot).
- PostgreSQL
- If you upgrade your copy of PostgreSQL, you should use the postgresql-upgrade-database command that Homebrew gives you.
- Install Pyenv
- Install NVM
- Node using NVM Use
@LTSor pinned version, e.g.@16
brew install --cask visual-studio-code
brew install --cask zoom
brew install autoconf automake gdbm gmp libksba libtool libyaml openssl pkg-config readline
brew install postgresql
brew install pyenv
nvm install --ltsAdd each of the following to Path:
# /usr/local/opt/node@16/binThe macOS uses standard OpenSSH suite of tools. Replace with appropriate values for content within quotes below, for commands in a terminal:
mkdir $HOME/.ssh
chmod 0700 $HOME/.ssh
ssh-keygen -t rsa -b 4096 -C "Me MyName (MyDevice) <me@mydomain.com>"- Install Facebook Messenger
- Install Discord
p10k configure
brew install --cask messenger
brew install --cask discord- Useful Zsh resource
- Linux Environment Variables