-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtesting-postinstall-10_base
executable file
·192 lines (179 loc) · 4.2 KB
/
testing-postinstall-10_base
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
#!/bin/bash
#repos: contrib non-free
#Note: a multi-user installation is possible. See https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation
#fonts-jetbrains-mono fonts-anonymous-pro
#deb dpkg: nix-bin
export DEBIAN_FRONTEND=noninteractive
export NEEDRESTART_MODE=a
CODENAME=$(lsb_release -sc)
PKGS=(
atool
anacron
apticron
backupninja
bat
build-essential
clang
clang-tools
curl
detox
diffoscope-minimal
dkms
duf
dos2unix
docker-clean
docker-compose
docker.io
exa
fd-find
ffmpeg
ffmpegthumbnailer
firmware-linux
firmware-linux-free
firmware-linux-nonfree
ftp
fzf
gdebi
golang
git
gita
jq
ldap-utils
libproxychains4
libssl-dev
libx11-dev
linux-headers-amd64
lldb
locate
mariadb-client
miller
needrestart
neofetch
neovim
newsboat
nodejs
npm
ntpdate
odt2txt
openvpn
pdftk
pipx
pkg-config
poppler-utils
proxychains4
putty-tools
python3-ldap
python3-pil
python3-pip
python3-venv
ranger
rdiff-backup
ripgrep
rsync
ruby-dev
ruby-notify
samba-common
shellcheck
strace
sudo
swaks
tcpdump
tig
tre-command
tshark
unrar
vim
w3m
xorriso
yadm
yt-dlp
)
echo "Installation APT: " "${PKGS[@]}"
sudo apt-get -y install "${PKGS[@]}" >/dev/null
PIPX_PKGS=(
pywhat
reindent
streamlink
)
echo "Installation logiciels pipx: " "${PIPX_PKGS[@]}"
for PKG in "${PIPX_PKGS[@]}"; do
if [[ ! -d "$HOME/.local/pipx/venvs/$PKG" ]]; then
pipx install "$PKG" >/dev/null
fi
done
PATH=$HOME/.local/bin:$PATH
if [[ ! -d "$HOME/.local/share/fonts/NerdFonts" ]]; then
echo "Installing Nerd Fonts"
sudo apt-get install -y subversion-tools >/dev/null
mkdir -p /tmp/nerd-fonts/patched-fonts
cd /tmp/nerd-fonts/patched-fonts || exit
svn export https://github.com/ryanoasis/nerd-fonts/trunk/patched-fonts/JetBrainsMono >/dev/null
cd /tmp/nerd-fonts/ || exit
wget -q https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/install.sh
bash install.sh JetBrainsMono >/dev/null
fi
echo "Installation cargo"
/usr/bin/curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -q -y
source "$HOME"/.cargo/env
echo "Installation pkgs cargo"
CARGO_PKGS=(
cargo-edit
cargo-update
mdcat
)
for PKG in "${CARGO_PKGS[@]}"; do
echo " pkg $PKG"
cargo -q install "$PKG"
done
if [[ ! -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]]; then
echo "Installation nix"
curl -sSL https://nixos.org/nix/install | sh
. "$HOME"/.nix-profile/etc/profile.d/nix.sh
fi
NIX_PKGS=(
bash-completion
direnv
)
sudo -E sh -c 'echo 1 > /proc/sys/vm/overcommit_memory' # probleme memoire
for PKG in "${NIX_PKGS[@]}"; do
if [[ ! -L "$HOME/.nix-profile/bin/$PKG" ]]; then
echo "Installation pkg nix $PKG"
"$HOME"/.nix-profile/bin/nix-env --quiet -i "$PKG" >/dev/null
fi
done
if [[ ! -d $HOME/dev/src/github.com/humboldtux ]]; then
mkdir -p "$HOME"/{bin,dev,pkg} \
"$HOME"/dev/src/github.com/humboldtux
fi
export GOPATH="$HOME"/dev
export GOBIN="$HOME"/go/bin
PKGS_GO=(
github.com/akavel/up
github.com/claudiodangelis/qrcp
github.com/jesseduffield/lazygit
mvdan.cc/sh/v3/cmd/shfmt
)
echo "Installation go get"
for PKG in "${PKGS_GO[@]}"; do
/usr/bin/go install "$PKG"@latest
done
bash "$HOME"/dev/src/github.com/humboldtux/scripts/install_binaries
git clone https://github.com/humboldtux/cheats "$HOME"/dev/src/github.com/humboldtux/cheats 2>/dev/null
git clone https://github.com/humboldtux/scripts "$HOME"/dev/src/github.com/humboldtux/scripts 2>/dev/null
gita add "$HOME"/dev/src/github.com/humboldtux/{cheats,scripts}*
if ! dpkg-query -W -f='${Status}' sysdig >/dev/null; then
echo "Installation sysdig"
curl -sSL https://s3.amazonaws.com/download.draios.com/stable/install-sysdig | sudo bash
fi
if [[ ! -d "$HOME/.local/share/yadm/repo.git" ]]; then
echo "Installation Yadm"
yadm clone "https://github.com/humboldtux/dotfiles.git" --no-bootstrap
yadm reset --hard
fi
if ! dpkg-query -W -f='${Status}' crowdsec >/dev/null; then
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
sudo apt-get install -y crowdsec >/dev/null
sudo sed -i 's/8080/8181/g' /etc/crowdsec/{config,local_api_credentials}.yaml
sudo systemctl restart crowdsec >/dev/null
sudo apt-get install -y crowdsec-firewall-bouncer-iptables >/dev/null
fi