blob: 6acea8e194eeb3e2150a9fc30870a9a46ec27135 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
# Prerequisites :
## MacOS
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
```
## 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
git clone https://git.sr.ht/~a14m/.rc ~/.rc
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/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
mkdir -p ~/.config/ctags
ln -sf ~/.rc/.config/ctags/groovy.ctags ~/.config/ctags/groovy.ctags
ln -sf ~/.rc/.config/ctags/gradle.ctags ~/.config/ctags/gradle.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
```
## 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 [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
```
|