blob: d9dcf745ae23a6635d22420aae6329ee142cd5ea (
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
|
# Prerequisites :
Install xcode and homebrew
```bash
xcode-select --install
git clone https://github.com/a14m/.rc.git ~/.rc
cd ~/.rc
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
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/.netrc ~/.netrc
ln -sf ~/.rc/.screenrc ~/.screenrc
ln -sf ~/.rc/.terraformrc ~/.terraformrc
ln -sf ~/.rc/.tmux.conf ~/.tmux.conf
chmod 600 ~/.netrc
chmod 600 ~/.terraformrc
ln -sf ~/.rc/.gitconfig ~/.gitconfig
ln -sf ~/.rc/.gitignore_global ~/.gitignore_global
mkdir -p ~/.ssh
ln -sf ~/.rc/.ssh/config ~/.ssh/config
mkdir -p ~/.aws
ln -sf ~/.rc/.aws/config ~/.aws/config
ln -sf ~/.rc/.aws/credentials ~/.aws/credentials
mkdir -p ~/.config/htop ~/.config/wtf
ln -sf ~/.rc/.config/htop/htoprc ~/.config/htop/htoprc
ln -sf ~/.rc/.config/wtf/config.yml ~/.config/wtf/config.yml
mkdir -p ~/.gnupg
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
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
chsh -s /usr/local/bin/bash
git remote remove origin
git remote add origin [email protected]:a14m/.rc.git
```
- Load pgp key from card and trust it
```bash
gpg --edit-card
> fetch
gpg --edit-key [email protected]
> trust
```
## Languages
- Setup ruby/rbenv
```bash
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 rust
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
- Setup node/nvm
```bash
mkdir -p ~/.nvm
ln -sf ~/.rc/.npmrc ~/.npmrc
ln -sf ~/.rc/.nvmrc ~/.nvmrc
ln -sf ~/.rc/.nvm/default-packages ~/.nvm/default-packages
nvm install
nvm alias default
```
## Tools
- Git Crypt
```bash
brew install git-crypt
source ~/.bash_profile
git-crypt unlock
```
- Setup tmux plugins
```bash
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
brew install ansifilter
```
- Setup password store
```bash
git clone [email protected]: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
```
- [POW](http://pow.cx/)
```bash
# Install pow
curl get.pow.cx | sh
ln -sf ~/.rc/.powconfig ~/.powconfig
# Uninstall pow
curl get.pow.cx/uninstall.sh | sh
```
## Debian Linux
- Add missing dependencies
```bash
sudo apt update -y
sudo apt upgrade -y
sudo apt install scdaemon vim htop tmux pass pass-extension-otp git-crypt -y
```
|