summaryrefslogtreecommitdiffstats
path: root/MacOS.md
diff options
context:
space:
mode:
Diffstat (limited to 'MacOS.md')
-rw-r--r--MacOS.md183
1 files changed, 183 insertions, 0 deletions
diff --git a/MacOS.md b/MacOS.md
new file mode 100644
index 0000000..3d9ceed
--- /dev/null
+++ b/MacOS.md
@@ -0,0 +1,183 @@
+# Prerequisites :
+Install xcode and homebrew
+
+```bash
+xcode-select --install
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+git clone https://git.sr.ht/~a14m/.rc ~/.rc
+cd ~/.rc
+brew analytics off
+brew tap Homebrew/bundle
+brew bundle
+```
+# Installation :
+## Essentials
+```bash
+ln -sf ~/.rc/.bash_profile ~/.bash_profile
+ln -sf ~/.rc/.editorconfig ~/.editorconfig
+ln -sf ~/.rc/.inputrc ~/.inputrc
+ln -sf ~/.rc/.screenrc ~/.screenrc
+ln -sf ~/.rc/.tmux.conf ~/.tmux.conf
+ln -sf ~/.rc/.tmux-osx.conf ~/.tmux-osx.conf
+ln -sf ~/.rc/.amethyst.yml ~/.amethyst.yml
+
+ln -sf ~/.rc/.gitconfig ~/.gitconfig
+ln -sf ~/.rc/.gitconfig.work.inc ~/.gitconfig.work.inc
+ln -sf ~/.rc/.gitignore_global ~/.gitignore_global
+
+mkdir -p ~/.ssh
+ln -sf ~/.rc/.ssh/config ~/.ssh/config
+
+mkdir -p ~/.config/htop
+ln -sf ~/.rc/.config/htop/htoprc ~/.config/htop/htoprc
+
+mkdir -p ~/.config/tmuxinator
+ln -sf ~/.rc/.config/tmuxinator/personal.yml ~/.config/tmuxinator/personal.yml
+ln -sf ~/.rc/.config/tmuxinator/spc.yml ~/.config/tmuxinator/spc.yml
+ln -sf ~/.rc/.config/tmuxinator/mb.yml ~/.config/tmuxinator/mb.yml
+ln -sf ~/.rc/.config/tmuxinator/infra.yml ~/.config/tmuxinator/infra.yml
+
+ln -sf ~/.rc/.ctags ~/.ctags
+
+cd ~/.rc
+git remote remove origin
+git remote add origin [email protected]:~a14m/.rc
+```
+
+## GPG smart key
+- GPG setup
+```bash
+mkdir -p ~/.gnupg
+chmod 700 ~/.gnupg
+sudo ln -sf ~/.rc/.gnupg/pinentry-wrapper /usr/local/bin/pinentry-wrapper
+ln -sf ~/.rc/.gnupg/gpg-agent.conf ~/.gnupg/gpg-agent.conf
+ln -sf ~/.rc/.gnupg/sshcontrol ~/.gnupg/sshcontrol
+
+gpg-connect-agent killagent /bye
+gpg-connect-agent updatestartuptty /bye
+gpg-connect-agent /bye
+gpgconf --kill all
+```
+
+- Load pgp key from card and trust it
+```bash
+gpg --edit-card
+> fetch
+
+gpg --edit-key [email protected]
+> trust
+```
+
+## MacOS (extras)
+- Bash shell default
+```bash
+sudo bash -c 'echo $(brew --prefix)/bin/bash >> /etc/shells'
+chsh -s $(brew --prefix)/bin/bash
+```
+
+## Languages
+
+- Setup ruby/rbenv
+```bash
+brew install rbenv
+mkdir -p ~/.bundle
+ln -sf ~/.rc/.bundle/config ~/.bundle/config
+
+git clone https://github.com/tpope/rbenv-ctags.git ~/.rbenv/plugins/rbenv-ctags
+git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems
+
+ln -sf ~/.rc/.gemrc ~/.gemrc
+ln -sf ~/.rc/.rbenv/default-gems ~/.rbenv/default-gems
+rbenv install $(cat ~/.rc/.rbenv/version)
+ln -sf ~/.rc/.rbenv/version ~/.rbenv/version
+```
+
+- Setup python
+```bash
+brew install pyenv
+mkdir -p ~/.pyenv
+pyenv install $(cat ~/.rc/.pyenv/version)
+ln -sf ~/.rc/.pyenv/version ~/.pyenv/version
+```
+
+- Setup GO
+```bash
+brew install golang
+```
+
+- Setup rust
+```bash
+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+```
+
+- Setup node/nvm
+```bash
+brew install nvm
+mkdir -p ~/.nvm
+ln -sf ~/.rc/.npmrc ~/.npmrc
+ln -sf ~/.rc/.nvmrc ~/.nvmrc
+ln -sf ~/.rc/.nvm/default-packages ~/.nvm/default-packages
+exec $SHELL -l
+
+nvm install
+nvm alias default
+```
+
+## Tools
+
+- Git Crypt
+```bash
+brew install git-crypt
+source ~/.bash_profile
+cd ~/.rc
+git-crypt unlock
+```
+
+- Setup password store
+```bash
+git clone [email protected]:a14m/.pass ~/.password-store
+```
+
+- [vim](https://git.sr.ht/~a14m/.vim)
+```bash
+git clone [email protected]:~a14m/.vim ~/.vim
+ln -sf ~/.vim/.vimrc ~/.vimrc
+vim +PlugInstall
+```
+
+- [cht.st](https://github.com/chubin/cheat.sh)
+```bash
+curl https://cht.sh/:cht.sh | sudo tee /usr/local/bin/cht.sh
+sudo chmod +x /usr/local/bin/cht.sh
+brew install rlwrap
+sudo apt install rlwrap xsel -y
+```
+
+- Mutt email/links browser
+```bash
+brew install neomutt
+brew install links
+
+mkdir -p ~/.config/neomutt
+ln -sf ~/.rc/.neomuttrc ~/.neomuttrc
+ln -sf ~/.rc/.config/neomutt/settings ~/.config/neomutt/settings
+ln -sf ~/.rc/.config/neomutt/colors ~/.config/neomutt/colors
+ln -sf ~/.rc/.config/neomutt/mappings ~/.config/neomutt/mappings
+ln -sf ~/.rc/.config/neomutt/mailcap ~/.config/neomutt/mailcap
+
+mkdir -p ~/.links
+ln -sf ~/.rc/.links/links.cfg ~/.links/links.cfg
+```
+
+- WTFUtil
+```bash
+mkdir -p ~/.config/wtf
+ln -sf ~/.rc/.config/wtf/config.yml ~/.config/wtf/config.yml
+```
+
+- Shell GPT client
+```bash
+pip3 install shell-gpt
+mkdir -p ~/.config/shell_gpt
+ln -sf ~/.rc/.config/shell_gpt/.sgptrc ~/.config/shell_gpt/.sgptrc
+```