-
Notifications
You must be signed in to change notification settings - Fork 0
/
debian
155 lines (131 loc) · 5.28 KB
/
debian
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
#!/usr/bin/bash
# Tested only for Debian
# EDIT THE `codename` BELOW ! ! !
codename="bookworm"
append(){ # $1: text, $2: path
sudo=""
if [[ $2 != */home* ]]; then
sudo="sudo"
fi
$sudo mkdir -p $(dirname "$2") && $sudo touch "$2"
if [[ $(cat $2) == *"$1"* ]]; then
echo -e "
\rThe following lines were already added
\r=============
\r$1
\r============="
else
cat << POMU | $sudo tee -a $2 > /dev/null
$1
POMU
fi
}
sudo apt update -y
sudo apt upgrade -y
# Remove LibreOffice
#echo "
#Removing LibreOffice"
#sudo apt-get remove --purge libreoffice*
#sudo apt-get clean
#sudo apt-get autoremove
# apt
echo "
Installing apt packages"
sudo apt install -t $codename-backports yt-dlp streamlink -y
sudo apt install flatpak gnome-software-plugin-flatpak mpv gimp qbittorrent kdenlive mkvtoolnix-gui git wget xclip neofetch aria2 gnome-tweaks qt5ct -y
# flatpak
echo "
Installing flatpak packages"
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.belmoussaoui.Authenticator com.discordapp.Discord org.x.Warpinator com.github.finefindus.eyedropper com.mattjakeman.ExtensionManager -y
# Github CLI & login
echo "
Installing Github CLI & login"
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
gh auth login
# Linux config
echo "
Adding Linux configs"
git clone https://github.com/pomubry/linux-config.git ~/Downloads/linux-config
chmod +x ~/Downloads/linux-config/bin/*
mkdir ~/bin
cp -r ~/Downloads/linux-config/bin ~/Downloads/linux-config/mumble-dark.qbtheme ~/Downloads/linux-config/.poshthemes ~/Downloads/linux-config/.editorconfig ~
cp -r ~/Downloads/linux-config/Code ~/Downloads/linux-config/mpv ~/.config
append '
# bin
export PATH=~/bin:$PATH
export QT_QPA_PLATFORMTHEME=qt5ct' ~/.bashrc
if [[ $(cat ~/.gitconfig) == *defaultbranch* ]]; then
echo -e "\nGithub user/defaultbranch config already added. Skipping..."
else
echo "$(cat ~/Downloads/linux-config/.gitconfig)
$(cat ~/.gitconfig)" > ~/.gitconfig
fi
rm -rf ~/Downloads/linux-config
# oh-my-posh
echo "
Installing oh-my-posh"
curl -s https://ohmyposh.dev/install.sh | sudo bash -s
# mkdir ~/.poshthemes
# wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip
# unzip -o ~/.poshthemes/themes.zip -d ~/.poshthemes
chmod u+rw ~/.poshthemes/*.omp.*
# rm ~/.poshthemes/themes.zip
# font for oh-my-posh
echo "
Installing font for oh-my-posh"
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip -O ~/Downloads/jetbrains-nf.zip
mkdir ~/.fonts
unzip -o -j ~/Downloads/jetbrains-nf.zip "JetBrainsMonoNerdFont-Regular.ttf" -d ~/.fonts
rm ~/Downloads/jetbrains-nf.zip
# config for oh-my-posh
append '
# poshtheme config
eval "$(oh-my-posh init bash --config ~/.poshthemes/pdrome.omp.json)"' ~/.bashrc
# nvm
echo "
Installing nvm"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
# VSCode
echo "
Installing VSCode"
sudo apt-get install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt install apt-transport-https
sudo apt update
sudo apt install code
# Veracrypt
echo "
Installing Veracrypt"
veracryptLatest=$(curl https://www.veracrypt.fr/en/Downloads.html | grep -i "Latest Stable Release" | egrep -o "[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}")
debianVersion=$(lsb_release -d | egrep -o "[0-9]{2}")
veracryptGui="https://launchpad.net/veracrypt/trunk/$veracryptLatest/+download/veracrypt-$veracryptLatest-Debian-$debianVersion-amd64.deb"
wget $veracryptGui -O ~/Downloads/veracryptGui.deb
sudo apt install ~/Downloads/veracryptGui.deb -y
rm ~/Downloads/veracryptGui.deb
# ProtonVPN
echo "
Installing ProtonVPN"
protonvpn=$(curl https://protonvpn.com/support/official-linux-vpn-debian/ | grep "/stable" | egrep -o "https.+\.deb")
wget $protonvpn -O ~/Downloads/protonvpn.deb
sudo apt install ~/Downloads/protonvpn.deb
sudo apt update -y
sudo apt install proton-vpn-gnome-desktop
sudo apt install libayatana-appindicator3-1 gir1.2-ayatanaappindicator3-0.1 gnome-shell-extension-appindicator
rm ~/Downloads/protonvpn.deb
# .NET
wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-7.0
echo "Done!"