Update install debian script
This commit is contained in:
parent
68ad39a468
commit
930d89c47b
|
@ -3,10 +3,14 @@
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y \
|
sudo apt install -y \
|
||||||
xserver-xorg `# for graphics` \
|
xserver-xorg `# for graphics` \
|
||||||
|
xinit `# for graphics` \
|
||||||
i3 `# for graphics` \
|
i3 `# for graphics` \
|
||||||
x11-xserver-utils `# for graphics` \
|
x11-xserver-utils `# for graphics` \
|
||||||
|
linux-headers-amd64 `# needed for nvidia-driver installation` \
|
||||||
brightnessctl `# for keyboard backlight` \
|
brightnessctl `# for keyboard backlight` \
|
||||||
xcompmgr `# for st opacity` \
|
xcompmgr `# for st opacity` \
|
||||||
|
x11-apps `# for st opacity` \
|
||||||
|
stterm `# st` \
|
||||||
mate-backgrounds `# for background` \
|
mate-backgrounds `# for background` \
|
||||||
xwallpaper `# for background` \
|
xwallpaper `# for background` \
|
||||||
pulseaudio `# for sound` \
|
pulseaudio `# for sound` \
|
||||||
|
@ -15,24 +19,39 @@ pasystray `# for audio control` \
|
||||||
iputils-ping `# ping etc.` \
|
iputils-ping `# ping etc.` \
|
||||||
neovim `# console editor` \
|
neovim `# console editor` \
|
||||||
psmisc `# pstree etc.` \
|
psmisc `# pstree etc.` \
|
||||||
software-properties-common `# manage repos (needed for nvidia-drivers installation)` \
|
software-properties-common `# manage repos (needed for nvidia-driver installation)` \
|
||||||
chromium \
|
chromium \
|
||||||
|
conky \
|
||||||
telegram-desktop \
|
telegram-desktop \
|
||||||
python3 \
|
python3 \
|
||||||
python3-venv
|
python3-venv \
|
||||||
|
curl
|
||||||
|
|
||||||
|
sudo update-alternatives --set x-terminal-emulator /usr/bin/st
|
||||||
|
|
||||||
|
# start window manager
|
||||||
cat > ~/.xinitrc << EOL
|
cat > ~/.xinitrc << EOL
|
||||||
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY & # because of slow Telegram start
|
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY & # because of slow Telegram start
|
||||||
xcompmgr & # for st opacity
|
xcompmgr -cC & # for st opacity
|
||||||
image=$(find /usr/share/backgrounds/mate/nature/ -type f | sort --random-sort | head -1)
|
image=\$(find /usr/share/backgrounds/mate/nature/ -type f | sort --random-sort | head -1)
|
||||||
xwallpaper --stretch $image
|
xwallpaper --stretch \$image
|
||||||
conky &
|
conky &
|
||||||
i3
|
i3
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
sudo add-apt-repository contrib non-free-firmware
|
# st opacity
|
||||||
|
if ! grep transset ~/.bashrc &> /dev/null; then
|
||||||
|
cat >> ~/.bashrc << EOL
|
||||||
|
term=\$(cat /proc/\$PPID/comm)
|
||||||
|
if [[ \$term == "x-terminal-emul" ]]; then
|
||||||
|
transset 0.6 --id \$WINDOWID > /dev/null
|
||||||
|
fi
|
||||||
|
EOL
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo add-apt-repository contrib non-free-firmware non-free -y
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install linux-headers-amd64 nvidia-driver linux-image-amd64
|
sudo apt install nvidia-driver linux-image-amd64 -y
|
||||||
|
|
||||||
|
|
||||||
for tool in create_systemd_service.py create_systemd_timer.py set_brightness.sh
|
for tool in create_systemd_service.py create_systemd_timer.py set_brightness.sh
|
||||||
|
@ -48,5 +67,8 @@ git config --global user.email "digitalstudium001@gmail.com"
|
||||||
|
|
||||||
sudo timedatectl set-timezone Europe/Moscow
|
sudo timedatectl set-timezone Europe/Moscow
|
||||||
|
|
||||||
|
sudo sed -i s/desktop/override/g /etc/conky/conky.conf
|
||||||
|
sudo sed -i s/top_left/top_right/g /etc/conky/conky.conf
|
||||||
sudo bash -c "echo 'PATH=\$PATH:\$(find /opt/ -executable -type f | grep -v \.so | xargs dirname | uniq | paste -s -d : | xargs -I _ echo _)' > /etc/profile.d/opt.sh"
|
sudo bash -c "echo 'PATH=\$PATH:\$(find /opt/ -executable -type f | grep -v \.so | xargs dirname | uniq | paste -s -d : | xargs -I _ echo _)' > /etc/profile.d/opt.sh"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,72 +1,26 @@
|
||||||
#!/bin/bash
|
#!/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
|
# for nodejs/opencommit
|
||||||
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
|
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
|
||||||
|
|
||||||
# apt packages
|
# apt packages
|
||||||
sudo nala update
|
sudo apt update
|
||||||
sudo nala install -y \
|
sudo apt install -y \
|
||||||
mpv `# for video playing` \
|
mpv `# for video playing` \
|
||||||
sxiv `# for pictures` \
|
sxiv `# for pictures` \
|
||||||
chafa `# for pictures` \
|
|
||||||
strace `# for tracing` \
|
strace `# for tracing` \
|
||||||
docker.io `# containers` \
|
docker.io `# containers` \
|
||||||
docker-compose `# containers` \
|
docker-compose `# containers` \
|
||||||
nodejs `# for opencommit` \
|
|
||||||
ffmpeg `# for video` \
|
ffmpeg `# for video` \
|
||||||
v4l2loopback-dkms `# for obs-studio` \
|
v4l2loopback-dkms `# for obs-studio` \
|
||||||
obs-studio `# for screen recording` \
|
obs-studio `# for screen recording` \
|
||||||
peek `# for screen recording` \
|
peek `# for screen recording` \
|
||||||
|
nodejs `# for opencommit` \
|
||||||
python3-pip `# pip` \
|
python3-pip `# pip` \
|
||||||
bat \
|
bat \
|
||||||
locales \
|
locales \
|
||||||
fzf \
|
scrot `# screenshots`
|
||||||
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 -f $fx ~/.trash/$(basename $fx)-`date +%Y-%m-%d-%H-%M-%S`
|
|
||||||
map <delete> trash
|
|
||||||
map i $batcat --force-colorization $f
|
|
||||||
map g $lazygit
|
|
||||||
map x $$f
|
|
||||||
map o $mimeopen --ask $f
|
|
||||||
map . set hidden!
|
|
||||||
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 swarm init
|
||||||
sudo docker stack deploy -c ollama-stack.yaml ollama
|
sudo docker stack deploy -c ollama-stack.yaml ollama
|
||||||
|
@ -77,6 +31,8 @@ do
|
||||||
sudo usermod -a -G $group $USER
|
sudo usermod -a -G $group $USER
|
||||||
done
|
done
|
||||||
|
|
||||||
|
newgrp docker
|
||||||
|
|
||||||
# background removal for obs-studio
|
# background removal for obs-studio
|
||||||
if [ ! -d /usr/share/obs/obs-plugins/obs-backgroundremoval ]
|
if [ ! -d /usr/share/obs/obs-plugins/obs-backgroundremoval ]
|
||||||
then
|
then
|
||||||
|
@ -85,36 +41,11 @@ then
|
||||||
rm -f obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
|
rm -f obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
|
||||||
fi
|
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
|
# install opencommit
|
||||||
if ! command -v opencommit &> /dev/null
|
if ! command -v opencommit &> /dev/null
|
||||||
then
|
then
|
||||||
git clone --depth 1 https://git.digitalstudium.com/digitalstudium/opencommit.git
|
sudo npm install -g opencommit
|
||||||
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
|
oco config set OCO_AI_PROVIDER=ollama
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -129,16 +60,8 @@ fi
|
||||||
# install gui scripts
|
# install gui scripts
|
||||||
if ! command -v a &> /dev/null
|
if ! command -v a &> /dev/null
|
||||||
then
|
then
|
||||||
wget https://git.digitalstudium.com/digitalstudium/tui-scripts/releases/download/1.13/tui-scripts_1.13-1.deb
|
curl -O "https://git.digitalstudium.com/digitalstudium/tui-scripts/releases/download/latest/tui-scripts_$(curl -s https://git.digitalstudium.com/digitalstudium/tui-scripts/raw/branch/main/VERSION)-1.deb"
|
||||||
sudo apt install -y ./tui-scripts_1.13-1.deb
|
sudo apt install -y ./tui-scripts_*.deb
|
||||||
rm -f tui-scripts_1.13-1.deb
|
rm -f tui-scripts*
|
||||||
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
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue