# Prerequisites : Clone the repo ```bash git clone https://git.sr.ht/~a14m/.rc ~/.rc ``` ## MacOS Install xcode and homebrew ```bash xcode-select --install ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" cd ~/.rc brew analytics off brew tap Homebrew/bundle brew bundle pip3 install shell-gpt ``` ## Debian Linux - Add missing dependencies ```bash sudo apt remove neovim -y sudo apt update -y sudo apt upgrade -y sudo reboot sudo apt install scdaemon vim htop tmux pass pass-extension-otp git-crypt pinentry-tty -y ln -sf ~/.rc/.bashrc ~/.bashrc sudo ln -sf /usr/bin/pinentry-tty /usr/local/bin/pinentry-tty sudo ln -sf /usr/bin/pinentry-curses /usr/local/bin/pinentry-curses ln -sf ~/.rc/.gnupg/gpg.conf ~/.gnupg/gpg.conf ``` # 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/wtf ln -sf ~/.rc/.config/wtf/config.yml ~/.config/wtf/config.yml mkdir -p ~/.config/shell_gpt ln -sf ~/.rc/.config/shell_gpt/.sgptrc ~/.config/shell_gpt/.sgptrc 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/infra.yml ~/.config/tmuxinator/infra.yml cd ~/.rc git remote remove origin git remote add origin git@git.sr.ht:~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 a14m@pm.me > trust ``` ## MacOS (extras) - Bash shell default ```bash sudo bash -c 'echo $(brew --prefix)/bin/bash >> /etc/shells' chsh -s $(brew --prefix)/bin/bash ``` ## ParrotOS (extras) ```bash # Allow ssh into the machine curl https://meta.sr.ht/~a14m.keys > ~/.ssh/authorized_keys sudo ln -sf ~/.rc/etc/ssh/sshd_config /etc/ssh/sshd_config sudo systemctl enable ssh # Setup extra PenTools ## SecLists git clone https://github.com/danielmiessler/SecLists.git ~/SecLists sudo mv ~/SecLists /usr/share/ ## Arsenal git clone https://github.com/Orange-Cyberdefense/arsenal.git ~/arsenal sudo mv ~/arsenal /usr/share/ cd /usr/share/arsenal/ python3 -m pip install -r requirements.txt ## searchsploit sudo git clone https://github.com/offensive-security/exploitdb.git /opt/exploitdb sudo ln -sf /opt/exploitdb/searchsploit /usr/local/bin/searchsploit cp -n /opt/exploitdb/.searchsploit_rc ~/ ## ffuf sudo apt install ffuf -y ## dotdotpwn.pl git clone https://github.com/wireghoul/dotdotpwn.git ~/dotdotpwn sudo mv ~/dotdotpwn /opt/ ## Thefuck sudo pip3 install thefuck ``` ## Languages - Setup ruby/rbenv ```bash brew install rbenv mkdir -p ~/.bundle ln -sf ~/.rc/.bundle/config ~/.bundle/config git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash git clone https://github.com/sstephenson/rbenv-vars.git ~/.rbenv/plugins/rbenv-vars 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 git clone https://github.com/rkh/rbenv-update.git ~/.rbenv/plugins/rbenv-update 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 git@github.com:a14m/.pass ~/.password-store ``` - [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 ```