Add debian install scripts
This commit is contained in:
parent
90923eb688
commit
521ddac09b
|
@ -0,0 +1,98 @@
|
|||
#!/bin/bash
|
||||
# install packages I need
|
||||
sudo apt update
|
||||
sudo apt install -y nala
|
||||
sudo nala install -y \
|
||||
xorg `# for graphics` \
|
||||
make `# for compiling gui` \
|
||||
gcc `# for compiling gui` \
|
||||
libx11-dev `# for compiling dwm` \
|
||||
libxft-dev `# for compiling dwm` \
|
||||
libxinerama-dev `# for compiling dwm` \
|
||||
libharfbuzz-dev `# for compiling st` \
|
||||
libimlib2-dev `# for compiling st` \
|
||||
suckless-tools `# for dmenu` \
|
||||
ncdu `# for disk usage analysys` \
|
||||
brightnessctl `# for keyboard backlight` \
|
||||
xcompmgr `# for st opacity` \
|
||||
gnome-backgrounds `# for background` \
|
||||
xwallpaper `# for background` \
|
||||
pulseaudio `# for sound` \
|
||||
pavucontrol `# for audio control` \
|
||||
pasystray `# for audio control` \
|
||||
iputils-ping `# ping etc.` \
|
||||
xfe `# classic file manager` \
|
||||
surf `# suckless lightweight browser` \
|
||||
micro `# console editor` \
|
||||
neovim `# console editor` \
|
||||
psmisc `# pstree etc.` \
|
||||
slack \
|
||||
firefox \
|
||||
python3 \
|
||||
python3-venv
|
||||
|
||||
# install telegram
|
||||
if [ ! -d /opt/Telegram ]
|
||||
then
|
||||
if [ ! -f telegram.tar.xz ]
|
||||
then
|
||||
curl -L https://telegram.org/dl/desktop/linux -o telegram.tar.xz
|
||||
fi
|
||||
tar -xf telegram.tar.xz
|
||||
rm -f telegram.tar.xz
|
||||
sudo mv Telegram /opt/
|
||||
fi
|
||||
|
||||
# remove autoinstalled stterm
|
||||
sudo apt remove stterm -y
|
||||
|
||||
|
||||
if [ ! -d ~/gui ]
|
||||
then
|
||||
git clone https://git.digitalstudium.com/digitalstudium/ubuntu-gui ~/gui
|
||||
fi
|
||||
|
||||
for tool in dwm st sent
|
||||
do
|
||||
# compiling dwm
|
||||
if ! command -v $tool &> /dev/null
|
||||
then
|
||||
cd ~/gui/$tool
|
||||
sudo make install clean
|
||||
cd -
|
||||
fi
|
||||
done
|
||||
|
||||
echo dwm > ~/.xinitrc # for starting dwm when startx
|
||||
|
||||
for tool in create_systemd_service.py create_systemd_timer.py set_brightness.sh update_gui.sh
|
||||
do
|
||||
if ! command -v $tool &> /dev/null
|
||||
then
|
||||
sudo cp $tool /usr/local/bin
|
||||
fi
|
||||
done
|
||||
|
||||
git config --global user.name "Digital Studium"
|
||||
git config --global user.email "digitalstudium001@gmail.com"
|
||||
|
||||
sudo create_systemd_service.py gui-updater /usr/local/bin/update_gui.sh
|
||||
sudo create_systemd_timer.py gui-updater '*-*-* *:*:*'
|
||||
|
||||
if [ ! -d ~/.dwm ]
|
||||
then
|
||||
mkdir $HOME/.dwm
|
||||
fi
|
||||
echo "xhost +local:" > $HOME/.dwm/autostart.sh # give permissions to display
|
||||
echo "xcompmgr &" >> $HOME/.dwm/autostart.sh # for st opacity
|
||||
echo "xwallpaper --stretch /usr/share/backgrounds/Blue_flower_by_Elena_Stravoravdi.jpg" >> $HOME/.dwm/autostart.sh # background
|
||||
echo "firefox &" >> $HOME/.dwm/autostart.sh
|
||||
echo "Telegram &" >> $HOME/.dwm/autostart.sh
|
||||
echo "st &" >> $HOME/.dwm/autostart.sh
|
||||
echo "pasystray &" >> $HOME/.dwm/autostart.sh
|
||||
chmod +x $HOME/.dwm/autostart.sh
|
||||
|
||||
sudo timedatectl set-timezone Europe/Moscow
|
||||
|
||||
sudo bash -c "echo 'PATH=\$(find /opt/ -executable -type f | grep -v \.so | xargs dirname | uniq | paste -s -d : | xargs -I _ echo \$PATH:_)' > /etc/profile.d/opt.sh"
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
#!/bin/bash
|
||||
## for nvidia-container-toolkit
|
||||
#curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
|
||||
# && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
|
||||
# sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
|
||||
# sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
|
||||
## obs-studio repo
|
||||
#sudo add-apt-repository ppa:obsproject/obs-studio -y
|
||||
## for tensorrt (remove backgrount in obs)
|
||||
#wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
|
||||
#sudo dpkg -i cuda-keyring_1.1-1_all.deb
|
||||
#rm -f cuda-keyring_1.1-1_all.deb
|
||||
|
||||
# for nodejs/opencommit
|
||||
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
|
||||
|
||||
# apt packages
|
||||
sudo nala update
|
||||
sudo nala install -y \
|
||||
mpv `# for video playing` \
|
||||
sxiv `# for pictures` \
|
||||
chafa `# for pictures` \
|
||||
strace `# for tracing` \
|
||||
docker.io `# containers` \
|
||||
docker-compose `# containers` \
|
||||
nodejs `# for opencommit` \
|
||||
ffmpeg `# for video` \
|
||||
v4l2loopback-dkms `# for obs-studio` \
|
||||
obs-studio `# for screen recording` \
|
||||
python3-pip `# pip` \
|
||||
bat \
|
||||
locales \
|
||||
fzf \
|
||||
scrot `# screenshots` \
|
||||
libreadline-dev `# for nnn` \
|
||||
nnn `# nnn is file manager` \
|
||||
pandoc `# pandoc onvers markdown to html` \
|
||||
cutycapt `# for converting html to image` \
|
||||
vifm `# vifm is file manager` \
|
||||
farbfeld `# for sent`
|
||||
|
||||
sudo locale-gen ru_RU
|
||||
sudo locale-gen ru_RU.UTF-8
|
||||
sudo update-locale
|
||||
|
||||
# lf settings
|
||||
sudo cp lf_preview.sh /usr/local/bin
|
||||
cat << 'EOF' > lfrc
|
||||
set sixel true
|
||||
set previewer lf_preview.sh
|
||||
cmd trash %set -f; mv $fx ~/.trash
|
||||
map <delete> trash
|
||||
map i $batcat --force-colorization $f
|
||||
map x $$f
|
||||
map o $mimeopen --ask $f
|
||||
EOF
|
||||
|
||||
sudo mkdir /etc/lf
|
||||
sudo cp lfrc /etc/lf
|
||||
rm -f lfrc
|
||||
|
||||
#if [ ! -f /etc/docker/daemon.json ]
|
||||
#then
|
||||
# sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
|
||||
# sudo service docker restart
|
||||
#fi
|
||||
|
||||
sudo docker swarm init
|
||||
sudo docker stack deploy -c ollama-stack.yaml ollama
|
||||
|
||||
# this is needed for pavucontrol/docker working not under sudo only
|
||||
for group in audio pulse-access pulse docker
|
||||
do
|
||||
sudo usermod -a -G $group $USER
|
||||
done
|
||||
|
||||
# background removal for obs-studio
|
||||
if [ ! -d /usr/share/obs/obs-plugins/obs-backgroundremoval ]
|
||||
then
|
||||
wget https://github.com/occ-ai/obs-backgroundremoval/releases/download/1.1.10/obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
|
||||
sudo apt install -y ./obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
|
||||
rm -f obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
|
||||
fi
|
||||
|
||||
# install lf
|
||||
if ! command -v lf &> /dev/null
|
||||
then
|
||||
wget https://github.com/gokcehan/lf/releases/download/r31/lf-linux-amd64.tar.gz
|
||||
tar -xvzf lf-linux-amd64.tar.gz
|
||||
sudo mv ./lf /usr/local/bin/
|
||||
rm -f lf-linux-amd64.tar.gz
|
||||
fi
|
||||
|
||||
|
||||
# install lazygit
|
||||
if ! command -v lazygit &> /dev/null
|
||||
then
|
||||
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
|
||||
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
|
||||
tar xf lazygit.tar.gz lazygit
|
||||
sudo install lazygit /usr/local/bin
|
||||
rm -rf ./lazygit*
|
||||
fi
|
||||
|
||||
# install opencommit
|
||||
if ! command -v opencommit &> /dev/null
|
||||
then
|
||||
git clone --depth 1 https://git.digitalstudium.com/digitalstudium/opencommit.git
|
||||
cd opencommit
|
||||
npm run build
|
||||
npm pack
|
||||
sudo npm install -g opencommit-3.0.11.tgz
|
||||
cd -
|
||||
rm -rf opencommit
|
||||
oco config set OCO_AI_PROVIDER=ollama
|
||||
fi
|
||||
|
||||
# install pet
|
||||
if ! command -v pet &> /dev/null
|
||||
then
|
||||
wget https://github.com/knqyf263/pet/releases/download/v0.3.6/pet_0.3.6_linux_amd64.deb
|
||||
sudo apt install -y ./pet_0.3.6_linux_amd64.deb
|
||||
rm -f pet_0.3.6_linux_amd64.deb
|
||||
fi
|
||||
|
||||
# install gui scripts
|
||||
if ! command -v a &> /dev/null
|
||||
then
|
||||
wget https://git.digitalstudium.com/digitalstudium/gui-scripts/releases/download/1.3/gui-scripts_1.3-1.deb
|
||||
sudo apt install -y ./gui-scripts_1.3-1.deb
|
||||
rm -f gui-scripts_1.3-1.deb
|
||||
fi
|
||||
|
||||
# install kubectl
|
||||
if ! command -v kubectl &> /dev/null
|
||||
then
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
||||
rm -f kubectl
|
||||
fi
|
||||
|
|
@ -6,4 +6,4 @@ MEM=$(free -h --kilo | awk '/^Mem:/ {print $3 "/" $2}')
|
|||
CPU=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}' )
|
||||
DISK=$(df -Ph | grep "/dev/mapper/ubuntu--vg-ubuntu--lv" | awk {'print $5'})
|
||||
|
||||
/usr/bin/xsetroot -name "$battery_capacity% `date +"%a %d.%m %H:%M"`; $MEM $CPU% $DISK" # set systray
|
||||
/usr/bin/xsetroot -name "$battery_capacity% `date +"%a %d.%m %H:%M"`;MEM: $MEM CPU: $CPU% DISK: $DISK" # set systray
|
||||
|
|
Loading…
Reference in New Issue