Changed repo name to linuxbox

This commit is contained in:
Christoffer Martinsson 2025-04-26 08:25:16 +02:00
parent a376061367
commit 3bc04676f0
7 changed files with 199 additions and 185 deletions

View File

@ -1,4 +1,4 @@
# code_server
# linuxbox
Script and dotfiles for setting up complete dev environment based on Ubuntu 22.04 (and 24.04)
@ -25,9 +25,9 @@ Configure new VM with following resources:
```bash
sudo apt update && sudo apt -y install curl git
```
* Install code_server
* Install linuxbox
```bash
curl https://git.cmtec.se/cm/code_server/-/raw/main/update_wrapper.sh?ref_type=heads | bash -s
curl https://git.cmtec.se/cm/linuxbox/-/raw/main/update_wrapper.sh?ref_type=heads | bash -s
```
* exit session
* Log in via SSH (or open desktop terminal)

View File

@ -103,7 +103,7 @@ require('lazy').setup({
-- Color scheme ------------------------------------------
{
dir = "~/code_server/nightly_cm.nvim",
dir = "~/linuxbox/nightly_cm.nvim",
lazy = false,
priority = 1000,
config = function()

View File

@ -44,7 +44,7 @@
"custom/hostname": {
"format": "{text} - ",
"exec": "$HOME/code_server/hostname.sh",
"exec": "$HOME/linuxbox/hostname.sh",
"interval": "once",
"tooltip": false
},

View File

@ -13,5 +13,5 @@
keepBackup = false
# when working on work projects
[includeIf "gitdir:**/code_server/.git"]
path = ~/code_server/gitconfig
[includeIf "gitdir:**/linuxbox/.git"]
path = ~/linuxbox/gitconfig

View File

@ -47,6 +47,10 @@ EOT
fi
fi
# Symlink bashrc
printf -- '\033[33m Symlinking bashrc config\n\033[37m'
ln -sf ~/linuxbox/bashrc ~/.bashrc
# Update all pacman packages
printf -- '\033[33m Updating pacman packages\n\033[37m'
sudo pacman -Suyy --noconfirm
@ -95,7 +99,7 @@ sudo localectl set-locale LANG=en_US.UTF-8
# Install git
printf -- '\033[33m Installing git\n\033[37m'
sudo pacman --noconfirm --needed -S git
ln -sf ~/code_server/gitconfig ~/.gitconfig
ln -sf ~/linuxbox/gitconfig ~/.gitconfig
# Install hyprland
printf -- '\033[33m Installing hyprland\n\033[37m'
@ -113,44 +117,44 @@ mkdir -p ~/.config/qt5ct
mkdir -p ~/.config/qt6ct
mkdir -p ~/.config/dunst
if [ !"$HOSTNAME" == "" ]; then
ln -sf ~/code_server/config/hypr/hyprland_$HOSTNAME.conf ~/.config/hypr/hyprland.conf
if [ -f "~/linuxbox/config/hypr/hyprland_$HOSTNAME.conf" ]; then
ln -sf ~/linuxbox/config/hypr/hyprland_$HOSTNAME.conf ~/.config/hypr/hyprland.conf
else
ln -sf ~/code_server/config/hypr/hyprland_CMBOX.conf ~/.config/hypr/hyprland.conf
ln -sf ~/linuxbox/config/hypr/hyprland_CMBOX.conf ~/.config/hypr/hyprland.conf
fi
ln -sf ~/code_server/wrappedhl ~/.local/bin/wrappedhl
ln -sf ~/code_server/config/hypr/hypridle.conf ~/.config/hypr/hypridle.conf
ln -sf ~/code_server/config/gtk-3.0/settings.ini ~/.config/gtk-3.0/settings.ini
ln -sf ~/code_server/config/qt5ct/qt5ct.conf ~/.config/qt5ct/qt5ct.conf
ln -sf ~/code_server/config/qt6ct/qt6ct.conf ~/.config/qt6ct/qt6ct.conf
ln -sf ~/code_server/config/dunst/dunstrc ~/.config/dunst/dunstrc
ln -sf ~/linuxbox/wrappedhl ~/.local/bin/wrappedhl
ln -sf ~/linuxbox/config/hypr/hypridle.conf ~/.config/hypr/hypridle.conf
ln -sf ~/linuxbox/config/gtk-3.0/settings.ini ~/.config/gtk-3.0/settings.ini
ln -sf ~/linuxbox/config/qt5ct/qt5ct.conf ~/.config/qt5ct/qt5ct.conf
ln -sf ~/linuxbox/config/qt6ct/qt6ct.conf ~/.config/qt6ct/qt6ct.conf
ln -sf ~/linuxbox/config/dunst/dunstrc ~/.config/dunst/dunstrc
# Install waybar
printf -- '\033[33m Installing waybar\n\033[37m'
sudo pacman --noconfirm --needed -S waybar
mkdir -p ~/.config/waybar
ln -sf ~/code_server/config/waybar/config ~/.config/waybar/config
ln -sf ~/code_server/config/waybar/style.css ~/.config/waybar/style.css
ln -sf ~/linuxbox/config/waybar/config ~/.config/waybar/config
ln -sf ~/linuxbox/config/waybar/style.css ~/.config/waybar/style.css
# Install Audio
printf -- '\033[33m Installing Audio\n\033[37m'
sudo pacman --noconfirm --needed -S pipewire pipewire-pulse pipewire-alsa pavucontrol helvum
mkdir -p ~/.config/pipewire
ln -sf ~/code_server/config/pipewire/pipewire.conf ~/.config/pipewire/pipewire.conf
ln -sf ~/linuxbox/config/pipewire/pipewire.conf ~/.config/pipewire/pipewire.conf
# Install networkmanager
printf -- '\033[33m Installing networkmanager\n\033[37m'
sudo pacman --noconfirm --needed -S network-manager-applet
yay --noconfirm -S --needed --aur networkmanager-dmenu-git
mkdir -p ~/.config/networkmanager-dmenu
ln -sf ~/code_server/config/networkmanager-dmenu/config.ini ~/.config/networkmanager-dmenu/config.ini
ln -sf ~/linuxbox/config/networkmanager-dmenu/config.ini ~/.config/networkmanager-dmenu/config.ini
# Install autologin
printf -- '\033[33m Installing autologin\n\033[37m'
yay --noconfirm -S --needed --aur pam_autologin
sudo /bin/cp -rf ~/code_server/login /etc/pam.d/login
sudo /bin/cp -rf ~/code_server/getty@.service /usr/lib/systemd/system/getty@.service
sudo /bin/cp -rf ~/linuxbox/login /etc/pam.d/login
sudo /bin/cp -rf ~/linuxbox/getty@.service /usr/lib/systemd/system/getty@.service
sudo touch /etc/security/autologin.conf
# Install btop
@ -165,12 +169,12 @@ sudo pacman --noconfirm --needed -S ranger
printf -- '\033[33m Installing kitty\n\033[37m'
sudo pacman --noconfirm --needed -S kitty
mkdir -p ~/.config/kitty
ln -sf ~/code_server/config/kitty/kitty.conf ~/.config/kitty/kitty.conf
ln -sf ~/linuxbox/config/kitty/kitty.conf ~/.config/kitty/kitty.conf
# Install tmux
printf -- '\033[33m Installing tmux\n\033[37m'
sudo pacman --noconfirm --needed -S tmux
ln -sf ~/code_server/tmux.conf ~/.tmux.conf
ln -sf ~/linuxbox/tmux.conf ~/.tmux.conf
# Install python
printf -- '\033[33m Installing python\n\033[37m'
@ -186,7 +190,7 @@ source ~/.fzf.bash
# Install fzfmenu
printf -- '\033[33m Installing fzfmenu\n\033[37m'
mkdir -p ~/.local/bin
ln -sf ~/code_server/fzfmenu.sh ~/.local/bin/fzfmenu
ln -sf ~/linuxbox/fzfmenu.sh ~/.local/bin/fzfmenu
# # Install VirtualHere server
# curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sudo sh
@ -222,11 +226,11 @@ fi
printf -- '\033[33m Installing neovim\n\033[37m'
sudo pacman --noconfirm --needed -S neovim
mkdir -p ~/.config/nvim
ln -sf ~/code_server/config/nvim/init.lua ~/.config/nvim/init.lua
ln -sf ~/code_server/clang-format ~/.clang-format
ln -sf ~/code_server/luacheckrc ~/.luacheckrc
ln -sf ~/linuxbox/config/nvim/init.lua ~/.config/nvim/init.lua
ln -sf ~/linuxbox/clang-format ~/.clang-format
ln -sf ~/linuxbox/luacheckrc ~/.luacheckrc
mkdir -p ~/.local/bin
ln -sf ~/code_server/pico-load.sh ~/.local/bin/pico-load
ln -sf ~/linuxbox/pico-load.sh ~/.local/bin/pico-load
# Install fd
printf -- '\033[33m Installing fd\n\033[37m'
@ -241,7 +245,7 @@ tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin
rm ~/lazygit && rm ~/lazygit.tar.gz
mkdir -p ~/.config/lazygit
ln -sf ~/code_server/config/lazygit/config.yml ~/.config/lazygit/config.yml
ln -sf ~/linuxbox/config/lazygit/config.yml ~/.config/lazygit/config.yml
# Install gdu
printf -- '\033[33m Installing gdu\n\033[37m'
@ -290,7 +294,7 @@ cd ~
git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
make -C ble.sh install
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
ln -sf ~/code_server/blerc ~/.blerc
ln -sf ~/linuxbox/blerc ~/.blerc
# Install platformio
printf -- '\033[33m Installing platformio\n\033[37m'
@ -334,7 +338,7 @@ cargo install zoxide --locked
# Install starship
printf -- '\033[33m Installing starship\n\033[37m'
cargo install starship --locked
ln -sf ~/code_server/config/starship.toml ~/.config/starship.toml
ln -sf ~/linuxbox/config/starship.toml ~/.config/starship.toml
# Install Discord (Equibop)
printf -- '\033[33m Installing Discord (Equibop)\n\033[37m'
@ -432,31 +436,41 @@ sudo pacman --noconfirm --needed -S intel-media-driver
yay --noconfirm --needed -S sunshine
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/60-sunshine.rules
mkdir -p ~/.config/systemd/user
cp -f ~/code_server/config/systemd/user/sunshine.service ~/.config/systemd/user/sunshine.service
cp -f ~/linuxbox/config/systemd/user/sunshine.service ~/.config/systemd/user/sunshine.service
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
sudo systemctl daemon-reload
systemctl --user start sunshine
# Install game services
# Install steam
if [ "$HOSTNAME" == "STEAMBOX" ]; then
printf -- '\033[33m Installing Game services\n\033[37m'
# sudo systemctl enable fstrim.timer
sudo pacman -S --noconfirm --needed steam lutris wine-staging winetricks gamemode lib32-gamemode giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal \
v4l-utils lib32-v4l-utils libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama \
lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader \
lib32-vulkan-icd-loader mangohud lib32-mangohud goverlay gamescope solaar lib32-libpulse
yay --noconfirm -S --needed --aur vkbasalt lib32-vkbasalt proton-ge-custom-bin xone-dkms-git dxvk-bin vkd3d-proton-bin
printf -- '\033[33m Installing steam\n\033[37m'
sudo pacman -S --noconfirm --needed steam
yay --noconfirm -S --needed --aur protonup-qt
fi
# Install starcitizen
if [ "$HOSTNAME" == "STEAMBOX" ]; then
printf -- '\033[33m Installing starcitizen\n\033[37m'
sudo pacman -S --noconfirm --needed wine-staging winetricks wine-mono wine-gecko
yay --noconfirm -S --needed --aur lug-helper
fi
# # Install game services
# if [ "$HOSTNAME" == "STEAMBOX" ]; then
# printf -- '\033[33m Installing Game services\n\033[37m'
# # sudo systemctl enable fstrim.timer
# sudo pacman -S --noconfirm --needed steam lutris wine-staging winetricks gamemode lib32-gamemode giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal \
# v4l-utils lib32-v4l-utils libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama \
# lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader \
# lib32-vulkan-icd-loader mangohud lib32-mangohud goverlay gamescope solaar lib32-libpulse
# yay --noconfirm -S --needed --aur vkbasalt lib32-vkbasalt proton-ge-custom-bin xone-dkms-git dxvk-bin vkd3d-proton-bin
# fi
# Symlink update script
printf -- '\033[33m Symlinking update wrapper\n\033[37m'
mkdir -p ~/.local/bin
ln -sf ~/code_server/update_wrapper.sh ~/.local/bin/update
# Symlink bashrc
printf -- '\033[33m Symlinking bashrc config\n\033[37m'
ln -sf ~/code_server/bashrc ~/.bashrc
ln -sf ~/linuxbox/update_wrapper.sh ~/.local/bin/update
printf -- '\033[32m \n\n***** Update complete! Please reboot. *****\n\n\033[37m'

View File

@ -45,7 +45,7 @@ printf -- '\033[32m *** System applications ***\n\033[37m'
# Ubuntu 20.04 workaround
if [ "$WSL" == "yes" ]; then
sudo apt -y purge --auto-remove neovim
sudo apt -y purge --auto-remove neovim
fi
# Update system
@ -53,20 +53,20 @@ printf -- '\033[33m Updating system\n\033[37m'
sudo apt update
sudo apt upgrade -y
if [ "$WSL" == "no" ]; then
if dpkg -s flatpak &>/dev/null; then
flatpak update -y
else
sudo add-apt-repository -y ppa:flatpak/stable
sudo apt update
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub com.github.tchx84.Flatseal
fi
if dpkg -s flatpak &>/dev/null; then
flatpak update -y
else
sudo add-apt-repository -y ppa:flatpak/stable
sudo apt update
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub com.github.tchx84.Flatseal
fi
fi
if dpkg -s snap &>/dev/null; then
sudo snap refresh
sudo snap refresh
else
sudo apt install -y snap
sudo apt install -y snap
fi
# Install system packages
@ -83,16 +83,16 @@ sudo update-locale LANG=en_US.UTF-8
# if [ "$VER" == "22.04" ]; then
# sudo apt install -y xrdp
# sudo ufw allow 3389
# ln -sf ~/code_server/xsessionrc ~/.xsessionrc
# ln -sf ~/linuxbox/xsessionrc ~/.xsessionrc
# fi
# Install python
printf -- '\033[33m Installing python\n\033[37m'
sudo apt install -y python3 python3-pip python3-venv python3-dev pipx
if [ "$VER" == "22.04" ]; then
pip3 install pynvim
pip3 install pynvim
else
sudo apt install -y python3-pynvim
sudo apt install -y python3-pynvim
fi
# Install fzf
@ -123,13 +123,13 @@ sudo mv virtualhereclient.service /etc/systemd/system/virtualhereclient.service
# Install teensy udev rules (only for non docker system)
if [ ! -f /.dockerenv ]; then
printf -- '\033[33m Installing teensy udev rules\n\033[37m'
sudo rm -f /tmp/00-teensy.rules /etc/udev/rules.d/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo wget -O /tmp/00-teensy.rules https://www.pjrc.com/teensy/00-teensy.rules
sudo install -o root -g root -m 0664 /tmp/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo service udev restart
sudo udevadm control --reload-rules
sudo udevadm trigger
printf -- '\033[33m Installing teensy udev rules\n\033[37m'
sudo rm -f /tmp/00-teensy.rules /etc/udev/rules.d/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo wget -O /tmp/00-teensy.rules https://www.pjrc.com/teensy/00-teensy.rules
sudo install -o root -g root -m 0664 /tmp/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo service udev restart
sudo udevadm control --reload-rules
sudo udevadm trigger
fi
# Install neovim
@ -144,8 +144,8 @@ if [ -d ~/neovim ]; then rm -rf ~/neovim; fi
# Install caffeine
if [ "$WSL" == "no" ]; then
printf -- '\033[33m Installing caffeine\n\033[37m'
sudo apt install -y caffeine
printf -- '\033[33m Installing caffeine\n\033[37m'
sudo apt install -y caffeine
fi
# Install fd
printf -- '\033[33m Installing fd\n\033[37m'
@ -163,7 +163,7 @@ rm ~/lazygit && rm ~/lazygit.tar.gz
# Install gdu
printf -- '\033[33m Installing gdu\n\033[37m'
if [ $VER = "22.04" ]; then
sudo add-apt-repository -y ppa:daniel-milde/gdu
sudo add-apt-repository -y ppa:daniel-milde/gdu
fi
sudo apt update
sudo apt install -y gdu
@ -199,11 +199,11 @@ sudo apt install -y composer
# Install java
printf -- '\033[33m Installing java\n\033[37m'
if [ "$WSL" == "yes" ]; then
sudo add-apt-repository -y ppa:linuxuprising/java
sudo apt update
sudo apt install -y oracle-java17-installer
sudo add-apt-repository -y ppa:linuxuprising/java
sudo apt update
sudo apt install -y oracle-java17-installer
else
sudo apt install -y default-jdk
sudo apt install -y default-jdk
fi
# Install julia
@ -233,10 +233,10 @@ if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
# Install platformio
printf -- '\033[33m Installing platformio\n\033[37m'
if [ "$VER" == "24.04" ]; then
pipx install platformio
pipx ensurepath
pipx install platformio
pipx ensurepath
else
pip3 install platformio
pip3 install platformio
fi
# Install neovim for node
@ -248,7 +248,7 @@ printf -- '\033[33m Installing Rust\n\033[37m'
cd ~
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y
if [ "$WSL" == "yes" ]; then
source "$HOME/.cargo/env"
source "$HOME/.cargo/env"
fi
rustup self update
rustup update stable
@ -284,158 +284,158 @@ cargo install starship --locked
# *** Desktop applications ***
if [ "$WSL" == "no" ]; then
printf -- '\033[32m *** Desktop applications ***\n\033[37m'
printf -- '\033[32m *** Desktop applications ***\n\033[37m'
if [ "$DESKTOP" == "yes" ]; then
printf -- '\033[33m Installing Krita\n\033[37m'
flatpak install -y flathub org.kde.krita
if [ "$DESKTOP" == "yes" ]; then
printf -- '\033[33m Installing Krita\n\033[37m'
flatpak install -y flathub org.kde.krita
printf -- '\033[33m Installing KiCad\n\033[37m'
flatpak install -y flathub org.kicad.KiCad
printf -- '\033[33m Installing KiCad\n\033[37m'
flatpak install -y flathub org.kicad.KiCad
printf -- '\033[33m Installing FreeCad\n\033[37m'
flatpak install -y flathub org.freecadweb.FreeCAD
printf -- '\033[33m Installing FreeCad\n\033[37m'
flatpak install -y flathub org.freecadweb.FreeCAD
printf -- '\033[33m Installing Moonlight\n\033[37m'
flatpak install -y flathub com.moonlight_stream.Moonlight
printf -- '\033[33m Installing Moonlight\n\033[37m'
flatpak install -y flathub com.moonlight_stream.Moonlight
printf -- '\033[33m Installing DrawIo\n\033[37m'
flatpak install -y flathub com.jgraph.drawio.desktop
printf -- '\033[33m Installing DrawIo\n\033[37m'
flatpak install -y flathub com.jgraph.drawio.desktop
# Install VSCode
printf -- '\033[33m Installing VSCode\n\033[37m'
sudo snap install --classic code
# Install VSCode
printf -- '\033[33m Installing VSCode\n\033[37m'
sudo snap install --classic code
# Install gnome-shell-extension-manager
printf -- '\033[33m Installing gnome-shell-extension-manager\n\033[37m'
sudo apt install -y gnome-shell-extension-manager
# Install gnome-shell-extension-manager
printf -- '\033[33m Installing gnome-shell-extension-manager\n\033[37m'
sudo apt install -y gnome-shell-extension-manager
# Install gnome tweaks
printf -- '\033[33m Installing gnome tweaks\n\033[37m'
sudo apt install -y gnome-tweaks
# Install gnome tweaks
printf -- '\033[33m Installing gnome tweaks\n\033[37m'
sudo apt install -y gnome-tweaks
# Install remmina
printf -- '\033[33m Installing remmina\n\033[37m'
sudo apt install -y remmina
# Install remmina
printf -- '\033[33m Installing remmina\n\033[37m'
sudo apt install -y remmina
# Install feh
printf -- '\033[33m Installing feh\n\033[37m'
sudo apt install -y feh
# Install feh
printf -- '\033[33m Installing feh\n\033[37m'
sudo apt install -y feh
# Install NerdFonts
printf -- '\033[33m Installing NerdFonts\n\033[37m'
mkdir -p /home/$USER/.local/share/fonts
cd /home/$USER/.local/share/fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CodeNewRoman.zip
unzip -o CodeNewRoman.zip
rm CodeNewRoman.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/NerdFontsSymbolsOnly.zip
unzip -o NerdFontsSymbolsOnly.zip
rm NerdFontsSymbolsOnly.zip
fc-cache -fv
# Install NerdFonts
printf -- '\033[33m Installing NerdFonts\n\033[37m'
mkdir -p /home/$USER/.local/share/fonts
cd /home/$USER/.local/share/fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CodeNewRoman.zip
unzip -o CodeNewRoman.zip
rm CodeNewRoman.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/NerdFontsSymbolsOnly.zip
unzip -o NerdFontsSymbolsOnly.zip
rm NerdFontsSymbolsOnly.zip
fc-cache -fv
# Install Wezterm
printf -- '\033[33m Installing wezterm\n\033[37m'
curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg
echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list
sudo apt update
sudo apt install -y wezterm
# Install Wezterm
printf -- '\033[33m Installing wezterm\n\033[37m'
curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg
echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list
sudo apt update
sudo apt install -y wezterm
# Install Brave Browser
printf -- '\033[33m Installing Brave Browser\n\033[37m'
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo apt install -y brave-browser
# Install Brave Browser
printf -- '\033[33m Installing Brave Browser\n\033[37m'
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo apt install -y brave-browser
# Install Virtualbox
printf -- '\033[33m Installing Virtualbox\n\033[37m'
curl https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor >oracle_vbox_2016.gpg
curl https://www.virtualbox.org/download/oracle_vbox.asc | gpg --dearmor >oracle_vbox.gpg
sudo install -o root -g root -m 644 oracle_vbox_2016.gpg /etc/apt/trusted.gpg.d/
sudo install -o root -g root -m 644 oracle_vbox.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt update
sudo apt install -y linux-headers-"$(uname -r)" dkms
sudo apt install virtualbox-7.1 -y
wget https://download.virtualbox.org/virtualbox/7.1.4/Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack
sudo VBoxManage extpack install --replace Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack --accept-license=eb31505e56e9b4d0fbca139104da41ac6f6b98f8e78968bdf01b1f3da3c4f9ae
sudo usermod -a -G vboxusers "$USER"
# Install Virtualbox
printf -- '\033[33m Installing Virtualbox\n\033[37m'
curl https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor >oracle_vbox_2016.gpg
curl https://www.virtualbox.org/download/oracle_vbox.asc | gpg --dearmor >oracle_vbox.gpg
sudo install -o root -g root -m 644 oracle_vbox_2016.gpg /etc/apt/trusted.gpg.d/
sudo install -o root -g root -m 644 oracle_vbox.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt update
sudo apt install -y linux-headers-"$(uname -r)" dkms
sudo apt install virtualbox-7.1 -y
wget https://download.virtualbox.org/virtualbox/7.1.4/Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack
sudo VBoxManage extpack install --replace Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack --accept-license=eb31505e56e9b4d0fbca139104da41ac6f6b98f8e78968bdf01b1f3da3c4f9ae
sudo usermod -a -G vboxusers "$USER"
printf -- '\033[33m Installing Audio control\n\033[37m'
if [ $VER == "22.04" ]; then
# Install helvum
sudo apt install -y pavucontrol
fi
if [ $VER == "24.04" ]; then
# Install helvum
sudo apt install -y pavucontrol helvum
fi
printf -- '\033[33m Installing Audio control\n\033[37m'
if [ $VER == "22.04" ]; then
# Install helvum
sudo apt install -y pavucontrol
fi
if [ $VER == "24.04" ]; then
# Install helvum
sudo apt install -y pavucontrol helvum
fi
# Install timeshift
printf -- '\033[33m Installing Timeshift\n\033[37m'
sudo apt install -y timeshift
# Install timeshift
printf -- '\033[33m Installing Timeshift\n\033[37m'
sudo apt install -y timeshift
fi
fi
fi
# *** Dotfile symlinking ***
printf -- '\033[32m *** Dotfile symlinking ***\n\033[37m'
if [ "$WSL" == "no" ]; then
# Symlink wezterm config
printf -- '\033[33m Symlinking wezterm config\n\033[37m'
ln -sf ~/code_server/wezterm.lua ~/.wezterm.lua
# Symlink wezterm config
printf -- '\033[33m Symlinking wezterm config\n\033[37m'
ln -sf ~/linuxbox/wezterm.lua ~/.wezterm.lua
fi
# Symlink nvim config
printf -- '\033[33m Symlinking nvim config\n\033[37m'
mkdir -p ~/.config/nvim
ln -sf ~/code_server/config/nvim/init.lua ~/.config/nvim/init.lua
ln -sf ~/linuxbox/config/nvim/init.lua ~/.config/nvim/init.lua
# Symlink git config
printf -- '\033[33m Symlinking git config\n\033[37m'
if [ "$WSL" == "yes" ]; then
ln -sf ~/code_server/gitconfig.work ~/.gitconfig
ln -sf ~/linuxbox/gitconfig.work ~/.gitconfig
else
ln -sf ~/code_server/gitconfig ~/.gitconfig
ln -sf ~/linuxbox/gitconfig ~/.gitconfig
fi
# Symlink tmux config
printf -- '\033[33m Symlinking tmux config\n\033[37m'
ln -sf ~/code_server/tmux.conf ~/.tmux.conf
ln -sf ~/linuxbox/tmux.conf ~/.tmux.conf
# Symlink clang-format config
printf -- '\033[33m Symlinking clang-format config\n\033[37m'
ln -sf ~/code_server/clang-format ~/.clang-format
ln -sf ~/linuxbox/clang-format ~/.clang-format
# Symlink lazygit config
printf -- '\033[33m Symlinking lazygit config\n\033[37m'
mkdir -p ~/.config/lazygit
ln -sf ~/code_server/config/lazygit/config.yml ~/.config/lazygit/config.yml
ln -sf ~/linuxbox/config/lazygit/config.yml ~/.config/lazygit/config.yml
# Symlink starsihp config
printf -- '\033[33m Symlinking starship config\n\033[37m'
ln -sf ~/code_server/config/starship.toml ~/.config/starship.toml
ln -sf ~/linuxbox/config/starship.toml ~/.config/starship.toml
# Symlink luacheck config
printf -- '\033[33m Symlinking luacheck config\n\033[37m'
ln -sf ~/code_server/luacheckrc ~/.luacheckrc
ln -sf ~/linuxbox/luacheckrc ~/.luacheckrc
# Symlink rp2040 flash script
printf -- '\033[33m Symlinking rp2040 flash script\n\033[37m'
mkdir -p ~/.local/bin
ln -sf ~/code_server/pico-load.sh ~/.local/bin/pico-load
ln -sf ~/linuxbox/pico-load.sh ~/.local/bin/pico-load
# Symlink blerc
printf -- '\033[33m Symlinking blerc config\n\033[37m'
ln -sf ~/code_server/blerc ~/.blerc
ln -sf ~/linuxbox/blerc ~/.blerc
# Symlink update script
printf -- '\033[33m Symlinking update wrapper\n\033[37m'
mkdir -p ~/.local/bin
ln -sf ~/code_server/update_wrapper.sh ~/.local/bin/update
ln -sf ~/linuxbox/update_wrapper.sh ~/.local/bin/update
# Symlink bashrc
printf -- '\033[33m Symlinking bashrc config\n\033[37m'
ln -sf ~/code_server/bashrc ~/.bashrc
ln -sf ~/linuxbox/bashrc ~/.bashrc
printf -- '\033[32m \n\n***** Update complete! Please restart your terminal. *****\n\n\033[37m'

View File

@ -2,23 +2,23 @@
set -e
if [ -f /etc/os-release ]; then
. /etc/os-release
OS=$NAME
. /etc/os-release
OS=$NAME
else
OS="none"
OS="none"
fi
if [ ! -d ~/code_server ]; then
cd ~ &&
git clone https://git.cmtec.se/cm/code_server.git
if [ ! -d ~/linuxbox ]; then
cd ~ &&
git clone https://git.cmtec.se/cm/linuxbox.git
fi
if [ -d ~/code_server ]; then
cd ~/code_server &&
git pull &&
if [ "$OS" == "Ubuntu" ]; then
./update_ubuntu.sh
elif [ "$OS" == "Arch Linux" ]; then
./update_arch.sh
fi
if [ -d ~/linuxbox ]; then
cd ~/linuxbox &&
git pull &&
if [ "$OS" == "Ubuntu" ]; then
./update_ubuntu.sh
elif [ "$OS" == "Arch Linux" ]; then
./update_arch.sh
fi
fi