Skip to content

alghanmi/dotfiles

Repository files navigation

Dotfiles

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

Hints and Tips

Enabling ZSH as Default Shell

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

Bootstrapping a Fresh MacOS Install

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.

  1. 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.
  2. Install Command Line Tools for Xcode. You can download it from the Apple Developer site or using the following command:
    xcode-select --install
  3. Update MacOS including Command Line Tools for Xcode:
    softwareupdate --all --install --force
  4. Install a temporary version of yadm
    curl -fLo /tmp/yadm https://github.com/TheLocehiliosan/yadm/raw/master/yadm && chmod a+x /tmp/yadm 
  5. Run yadm and bootstrap
    /tmp/yadm clone --bootstrap https://github.com/alghanmi/dotfiles.git

MacOS Desktop and Application Settings

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.

  1. 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}"
  2. Optional Configurations
    # Disable the sound effects on boot
    sudo nvram SystemAudioVolume=" "
  3. Run the configuration script
    ${HOME}/.config/macos/macos-settings

Antigen Error in Ubuntu

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

About

Dotfiles for my Linux and MacOSX environments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published