This is @alghanmi's dotfiles that are managed using yadm
. To use this repository, simply run:
# Clone the dotfiles
yadm clone https://github.com/alghanmi/dotfiles.git
# Bootstrap your environment
yadm bootstrap
This configuration uses zsh
as the default shell. Most likely, your shell is not set to zsh
by default. To do that, you should run the following command:
chsh -s $(which zsh)
If you get an error like chsh: /usr/local/bin/zsh: non-standard shell
, this means that you don't have zsh
(or the instance you are attempting to use) in your /etc/shells
file. So, make sure you append /etc/shells
to include it. That can be done by running the following command:
echo "$(which zsh)" | sudo tee -a /etc/shells
When a brand new installation of MacOS, it is not ready to use YADM out of the box. Please follow these steps for bootstrap the host initially, then, you can use yadm
normally after that.
- Open the
App Store
and Sign-in using your Apple credentials. This will allow you to install applications from the Mac App Store using mas-cli with Homebrew. - Install Command Line Tools for Xcode. You can download it from the Apple Developer site or using the following command:
xcode-select --install
- Update MacOS including Command Line Tools for Xcode:
softwareupdate --all --install --force
- Install a temporary version of
yadm
curl -fLo /tmp/yadm https://github.com/TheLocehiliosan/yadm/raw/master/yadm && chmod a+x /tmp/yadm
- Run
yadm
and bootstrap/tmp/yadm clone --bootstrap https://github.com/alghanmi/dotfiles.git
yadm boostrap
is used to configure all aspects of the environment except the MacOS desktop and applications settings. Starting from Mathias Bynens's dotfiles/.macos configuration, I created a macos-settings
bootstrap script. This should only be run as needed to avoid unexpected behaviour during the normal bootstrap process.
- Configure the computer name
# Choose a hostname export _hostname="tardis" sudo scutil --set ComputerName "${_hostname}" sudo scutil --set HostName "${_hostname}" sudo scutil --set LocalHostName "${_hostname}" sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "${_hostname}"
- Optional Configurations
# Disable the sound effects on boot sudo nvram SystemAudioVolume=" "
- Run the configuration script
${HOME}/.config/macos/macos-settings
In recent releases of Ubuntu (seen in 18.04 up to 20.04), the Antigen package is malformed. This will result in Antigen not loading properly. This is reported in zsh-users/antigen/issues/659. To resolve this issue, you can download the latest version of Antigen manually:
sudo curl --silent --location --output /usr/share/zsh-antigen/antigen.zsh https://raw.githubusercontent.com/zsh-users/antigen/master/bin/antigen.zsh