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) 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 ```bash
sudo apt update && sudo apt -y install curl git sudo apt update && sudo apt -y install curl git
``` ```
* Install code_server * Install linuxbox
```bash ```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 * exit session
* Log in via SSH (or open desktop terminal) * Log in via SSH (or open desktop terminal)

View File

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

View File

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

View File

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

View File

@ -47,6 +47,10 @@ EOT
fi fi
fi fi
# Symlink bashrc
printf -- '\033[33m Symlinking bashrc config\n\033[37m'
ln -sf ~/linuxbox/bashrc ~/.bashrc
# Update all pacman packages # Update all pacman packages
printf -- '\033[33m Updating pacman packages\n\033[37m' printf -- '\033[33m Updating pacman packages\n\033[37m'
sudo pacman -Suyy --noconfirm sudo pacman -Suyy --noconfirm
@ -95,7 +99,7 @@ sudo localectl set-locale LANG=en_US.UTF-8
# Install git # Install git
printf -- '\033[33m Installing git\n\033[37m' printf -- '\033[33m Installing git\n\033[37m'
sudo pacman --noconfirm --needed -S git sudo pacman --noconfirm --needed -S git
ln -sf ~/code_server/gitconfig ~/.gitconfig ln -sf ~/linuxbox/gitconfig ~/.gitconfig
# Install hyprland # Install hyprland
printf -- '\033[33m Installing hyprland\n\033[37m' printf -- '\033[33m Installing hyprland\n\033[37m'
@ -113,44 +117,44 @@ mkdir -p ~/.config/qt5ct
mkdir -p ~/.config/qt6ct mkdir -p ~/.config/qt6ct
mkdir -p ~/.config/dunst mkdir -p ~/.config/dunst
if [ !"$HOSTNAME" == "" ]; then if [ -f "~/linuxbox/config/hypr/hyprland_$HOSTNAME.conf" ]; then
ln -sf ~/code_server/config/hypr/hyprland_$HOSTNAME.conf ~/.config/hypr/hyprland.conf ln -sf ~/linuxbox/config/hypr/hyprland_$HOSTNAME.conf ~/.config/hypr/hyprland.conf
else 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 fi
ln -sf ~/code_server/wrappedhl ~/.local/bin/wrappedhl ln -sf ~/linuxbox/wrappedhl ~/.local/bin/wrappedhl
ln -sf ~/code_server/config/hypr/hypridle.conf ~/.config/hypr/hypridle.conf ln -sf ~/linuxbox/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 ~/linuxbox/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 ~/linuxbox/config/qt5ct/qt5ct.conf ~/.config/qt5ct/qt5ct.conf
ln -sf ~/code_server/config/qt6ct/qt6ct.conf ~/.config/qt6ct/qt6ct.conf ln -sf ~/linuxbox/config/qt6ct/qt6ct.conf ~/.config/qt6ct/qt6ct.conf
ln -sf ~/code_server/config/dunst/dunstrc ~/.config/dunst/dunstrc ln -sf ~/linuxbox/config/dunst/dunstrc ~/.config/dunst/dunstrc
# Install waybar # Install waybar
printf -- '\033[33m Installing waybar\n\033[37m' printf -- '\033[33m Installing waybar\n\033[37m'
sudo pacman --noconfirm --needed -S waybar sudo pacman --noconfirm --needed -S waybar
mkdir -p ~/.config/waybar mkdir -p ~/.config/waybar
ln -sf ~/code_server/config/waybar/config ~/.config/waybar/config ln -sf ~/linuxbox/config/waybar/config ~/.config/waybar/config
ln -sf ~/code_server/config/waybar/style.css ~/.config/waybar/style.css ln -sf ~/linuxbox/config/waybar/style.css ~/.config/waybar/style.css
# Install Audio # Install Audio
printf -- '\033[33m Installing Audio\n\033[37m' printf -- '\033[33m Installing Audio\n\033[37m'
sudo pacman --noconfirm --needed -S pipewire pipewire-pulse pipewire-alsa pavucontrol helvum sudo pacman --noconfirm --needed -S pipewire pipewire-pulse pipewire-alsa pavucontrol helvum
mkdir -p ~/.config/pipewire 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 # Install networkmanager
printf -- '\033[33m Installing networkmanager\n\033[37m' printf -- '\033[33m Installing networkmanager\n\033[37m'
sudo pacman --noconfirm --needed -S network-manager-applet sudo pacman --noconfirm --needed -S network-manager-applet
yay --noconfirm -S --needed --aur networkmanager-dmenu-git yay --noconfirm -S --needed --aur networkmanager-dmenu-git
mkdir -p ~/.config/networkmanager-dmenu 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 # Install autologin
printf -- '\033[33m Installing autologin\n\033[37m' printf -- '\033[33m Installing autologin\n\033[37m'
yay --noconfirm -S --needed --aur pam_autologin yay --noconfirm -S --needed --aur pam_autologin
sudo /bin/cp -rf ~/code_server/login /etc/pam.d/login sudo /bin/cp -rf ~/linuxbox/login /etc/pam.d/login
sudo /bin/cp -rf ~/code_server/getty@.service /usr/lib/systemd/system/getty@.service sudo /bin/cp -rf ~/linuxbox/getty@.service /usr/lib/systemd/system/getty@.service
sudo touch /etc/security/autologin.conf sudo touch /etc/security/autologin.conf
# Install btop # Install btop
@ -165,12 +169,12 @@ sudo pacman --noconfirm --needed -S ranger
printf -- '\033[33m Installing kitty\n\033[37m' printf -- '\033[33m Installing kitty\n\033[37m'
sudo pacman --noconfirm --needed -S kitty sudo pacman --noconfirm --needed -S kitty
mkdir -p ~/.config/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 # Install tmux
printf -- '\033[33m Installing tmux\n\033[37m' printf -- '\033[33m Installing tmux\n\033[37m'
sudo pacman --noconfirm --needed -S tmux sudo pacman --noconfirm --needed -S tmux
ln -sf ~/code_server/tmux.conf ~/.tmux.conf ln -sf ~/linuxbox/tmux.conf ~/.tmux.conf
# Install python # Install python
printf -- '\033[33m Installing python\n\033[37m' printf -- '\033[33m Installing python\n\033[37m'
@ -186,7 +190,7 @@ source ~/.fzf.bash
# Install fzfmenu # Install fzfmenu
printf -- '\033[33m Installing fzfmenu\n\033[37m' printf -- '\033[33m Installing fzfmenu\n\033[37m'
mkdir -p ~/.local/bin mkdir -p ~/.local/bin
ln -sf ~/code_server/fzfmenu.sh ~/.local/bin/fzfmenu ln -sf ~/linuxbox/fzfmenu.sh ~/.local/bin/fzfmenu
# # Install VirtualHere server # # Install VirtualHere server
# curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sudo sh # 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' printf -- '\033[33m Installing neovim\n\033[37m'
sudo pacman --noconfirm --needed -S neovim sudo pacman --noconfirm --needed -S neovim
mkdir -p ~/.config/nvim 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
ln -sf ~/code_server/clang-format ~/.clang-format ln -sf ~/linuxbox/clang-format ~/.clang-format
ln -sf ~/code_server/luacheckrc ~/.luacheckrc ln -sf ~/linuxbox/luacheckrc ~/.luacheckrc
mkdir -p ~/.local/bin 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 # Install fd
printf -- '\033[33m Installing fd\n\033[37m' printf -- '\033[33m Installing fd\n\033[37m'
@ -241,7 +245,7 @@ tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin sudo install lazygit /usr/local/bin
rm ~/lazygit && rm ~/lazygit.tar.gz rm ~/lazygit && rm ~/lazygit.tar.gz
mkdir -p ~/.config/lazygit 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 # Install gdu
printf -- '\033[33m Installing gdu\n\033[37m' 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 git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
make -C ble.sh install make -C ble.sh install
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
ln -sf ~/code_server/blerc ~/.blerc ln -sf ~/linuxbox/blerc ~/.blerc
# Install platformio # Install platformio
printf -- '\033[33m Installing platformio\n\033[37m' printf -- '\033[33m Installing platformio\n\033[37m'
@ -334,7 +338,7 @@ cargo install zoxide --locked
# Install starship # Install starship
printf -- '\033[33m Installing starship\n\033[37m' printf -- '\033[33m Installing starship\n\033[37m'
cargo install starship --locked 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) # Install Discord (Equibop)
printf -- '\033[33m Installing Discord (Equibop)\n\033[37m' 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 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 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 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 control --reload-rules
sudo udevadm trigger sudo udevadm trigger
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine)) sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
sudo systemctl daemon-reload sudo systemctl daemon-reload
systemctl --user start sunshine systemctl --user start sunshine
# Install game services # Install steam
if [ "$HOSTNAME" == "STEAMBOX" ]; then if [ "$HOSTNAME" == "STEAMBOX" ]; then
printf -- '\033[33m Installing Game services\n\033[37m' printf -- '\033[33m Installing steam\n\033[37m'
# sudo systemctl enable fstrim.timer sudo pacman -S --noconfirm --needed steam
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 \ yay --noconfirm -S --needed --aur protonup-qt
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 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 # Symlink update script
printf -- '\033[33m Symlinking update wrapper\n\033[37m' printf -- '\033[33m Symlinking update wrapper\n\033[37m'
mkdir -p ~/.local/bin 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
printf -- '\033[32m \n\n***** Update complete! Please reboot. *****\n\n\033[37m' 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 # Ubuntu 20.04 workaround
if [ "$WSL" == "yes" ]; then if [ "$WSL" == "yes" ]; then
sudo apt -y purge --auto-remove neovim sudo apt -y purge --auto-remove neovim
fi fi
# Update system # Update system
@ -53,20 +53,20 @@ printf -- '\033[33m Updating system\n\033[37m'
sudo apt update sudo apt update
sudo apt upgrade -y sudo apt upgrade -y
if [ "$WSL" == "no" ]; then if [ "$WSL" == "no" ]; then
if dpkg -s flatpak &>/dev/null; then if dpkg -s flatpak &>/dev/null; then
flatpak update -y flatpak update -y
else else
sudo add-apt-repository -y ppa:flatpak/stable sudo add-apt-repository -y ppa:flatpak/stable
sudo apt update sudo apt update
sudo apt install -y flatpak sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub com.github.tchx84.Flatseal flatpak install -y flathub com.github.tchx84.Flatseal
fi fi
fi fi
if dpkg -s snap &>/dev/null; then if dpkg -s snap &>/dev/null; then
sudo snap refresh sudo snap refresh
else else
sudo apt install -y snap sudo apt install -y snap
fi fi
# Install system packages # Install system packages
@ -83,16 +83,16 @@ sudo update-locale LANG=en_US.UTF-8
# if [ "$VER" == "22.04" ]; then # if [ "$VER" == "22.04" ]; then
# sudo apt install -y xrdp # sudo apt install -y xrdp
# sudo ufw allow 3389 # sudo ufw allow 3389
# ln -sf ~/code_server/xsessionrc ~/.xsessionrc # ln -sf ~/linuxbox/xsessionrc ~/.xsessionrc
# fi # fi
# Install python # Install python
printf -- '\033[33m Installing python\n\033[37m' printf -- '\033[33m Installing python\n\033[37m'
sudo apt install -y python3 python3-pip python3-venv python3-dev pipx sudo apt install -y python3 python3-pip python3-venv python3-dev pipx
if [ "$VER" == "22.04" ]; then if [ "$VER" == "22.04" ]; then
pip3 install pynvim pip3 install pynvim
else else
sudo apt install -y python3-pynvim sudo apt install -y python3-pynvim
fi fi
# Install fzf # Install fzf
@ -123,13 +123,13 @@ sudo mv virtualhereclient.service /etc/systemd/system/virtualhereclient.service
# Install teensy udev rules (only for non docker system) # Install teensy udev rules (only for non docker system)
if [ ! -f /.dockerenv ]; then if [ ! -f /.dockerenv ]; then
printf -- '\033[33m Installing teensy udev rules\n\033[37m' 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 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 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 install -o root -g root -m 0664 /tmp/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo service udev restart sudo service udev restart
sudo udevadm control --reload-rules sudo udevadm control --reload-rules
sudo udevadm trigger sudo udevadm trigger
fi fi
# Install neovim # Install neovim
@ -144,8 +144,8 @@ if [ -d ~/neovim ]; then rm -rf ~/neovim; fi
# Install caffeine # Install caffeine
if [ "$WSL" == "no" ]; then if [ "$WSL" == "no" ]; then
printf -- '\033[33m Installing caffeine\n\033[37m' printf -- '\033[33m Installing caffeine\n\033[37m'
sudo apt install -y caffeine sudo apt install -y caffeine
fi fi
# Install fd # Install fd
printf -- '\033[33m Installing fd\n\033[37m' printf -- '\033[33m Installing fd\n\033[37m'
@ -163,7 +163,7 @@ rm ~/lazygit && rm ~/lazygit.tar.gz
# Install gdu # Install gdu
printf -- '\033[33m Installing gdu\n\033[37m' printf -- '\033[33m Installing gdu\n\033[37m'
if [ $VER = "22.04" ]; then if [ $VER = "22.04" ]; then
sudo add-apt-repository -y ppa:daniel-milde/gdu sudo add-apt-repository -y ppa:daniel-milde/gdu
fi fi
sudo apt update sudo apt update
sudo apt install -y gdu sudo apt install -y gdu
@ -199,11 +199,11 @@ sudo apt install -y composer
# Install java # Install java
printf -- '\033[33m Installing java\n\033[37m' printf -- '\033[33m Installing java\n\033[37m'
if [ "$WSL" == "yes" ]; then if [ "$WSL" == "yes" ]; then
sudo add-apt-repository -y ppa:linuxuprising/java sudo add-apt-repository -y ppa:linuxuprising/java
sudo apt update sudo apt update
sudo apt install -y oracle-java17-installer sudo apt install -y oracle-java17-installer
else else
sudo apt install -y default-jdk sudo apt install -y default-jdk
fi fi
# Install julia # Install julia
@ -233,10 +233,10 @@ if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
# Install platformio # Install platformio
printf -- '\033[33m Installing platformio\n\033[37m' printf -- '\033[33m Installing platformio\n\033[37m'
if [ "$VER" == "24.04" ]; then if [ "$VER" == "24.04" ]; then
pipx install platformio pipx install platformio
pipx ensurepath pipx ensurepath
else else
pip3 install platformio pip3 install platformio
fi fi
# Install neovim for node # Install neovim for node
@ -248,7 +248,7 @@ printf -- '\033[33m Installing Rust\n\033[37m'
cd ~ cd ~
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y
if [ "$WSL" == "yes" ]; then if [ "$WSL" == "yes" ]; then
source "$HOME/.cargo/env" source "$HOME/.cargo/env"
fi fi
rustup self update rustup self update
rustup update stable rustup update stable
@ -284,158 +284,158 @@ cargo install starship --locked
# *** Desktop applications *** # *** Desktop applications ***
if [ "$WSL" == "no" ]; then if [ "$WSL" == "no" ]; then
printf -- '\033[32m *** Desktop applications ***\n\033[37m' printf -- '\033[32m *** Desktop applications ***\n\033[37m'
if [ "$DESKTOP" == "yes" ]; then if [ "$DESKTOP" == "yes" ]; then
printf -- '\033[33m Installing Krita\n\033[37m' printf -- '\033[33m Installing Krita\n\033[37m'
flatpak install -y flathub org.kde.krita flatpak install -y flathub org.kde.krita
printf -- '\033[33m Installing KiCad\n\033[37m' printf -- '\033[33m Installing KiCad\n\033[37m'
flatpak install -y flathub org.kicad.KiCad flatpak install -y flathub org.kicad.KiCad
printf -- '\033[33m Installing FreeCad\n\033[37m' printf -- '\033[33m Installing FreeCad\n\033[37m'
flatpak install -y flathub org.freecadweb.FreeCAD flatpak install -y flathub org.freecadweb.FreeCAD
printf -- '\033[33m Installing Moonlight\n\033[37m' printf -- '\033[33m Installing Moonlight\n\033[37m'
flatpak install -y flathub com.moonlight_stream.Moonlight flatpak install -y flathub com.moonlight_stream.Moonlight
printf -- '\033[33m Installing DrawIo\n\033[37m' printf -- '\033[33m Installing DrawIo\n\033[37m'
flatpak install -y flathub com.jgraph.drawio.desktop flatpak install -y flathub com.jgraph.drawio.desktop
# Install VSCode # Install VSCode
printf -- '\033[33m Installing VSCode\n\033[37m' printf -- '\033[33m Installing VSCode\n\033[37m'
sudo snap install --classic code sudo snap install --classic code
# Install gnome-shell-extension-manager # Install gnome-shell-extension-manager
printf -- '\033[33m Installing gnome-shell-extension-manager\n\033[37m' printf -- '\033[33m Installing gnome-shell-extension-manager\n\033[37m'
sudo apt install -y gnome-shell-extension-manager sudo apt install -y gnome-shell-extension-manager
# Install gnome tweaks # Install gnome tweaks
printf -- '\033[33m Installing gnome tweaks\n\033[37m' printf -- '\033[33m Installing gnome tweaks\n\033[37m'
sudo apt install -y gnome-tweaks sudo apt install -y gnome-tweaks
# Install remmina # Install remmina
printf -- '\033[33m Installing remmina\n\033[37m' printf -- '\033[33m Installing remmina\n\033[37m'
sudo apt install -y remmina sudo apt install -y remmina
# Install feh # Install feh
printf -- '\033[33m Installing feh\n\033[37m' printf -- '\033[33m Installing feh\n\033[37m'
sudo apt install -y feh sudo apt install -y feh
# Install NerdFonts # Install NerdFonts
printf -- '\033[33m Installing NerdFonts\n\033[37m' printf -- '\033[33m Installing NerdFonts\n\033[37m'
mkdir -p /home/$USER/.local/share/fonts mkdir -p /home/$USER/.local/share/fonts
cd /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 wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CodeNewRoman.zip
unzip -o CodeNewRoman.zip unzip -o CodeNewRoman.zip
rm CodeNewRoman.zip rm CodeNewRoman.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/NerdFontsSymbolsOnly.zip wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/NerdFontsSymbolsOnly.zip
unzip -o NerdFontsSymbolsOnly.zip unzip -o NerdFontsSymbolsOnly.zip
rm NerdFontsSymbolsOnly.zip rm NerdFontsSymbolsOnly.zip
fc-cache -fv fc-cache -fv
# Install Wezterm # Install Wezterm
printf -- '\033[33m Installing wezterm\n\033[37m' 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 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 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 update
sudo apt install -y wezterm sudo apt install -y wezterm
# Install Brave Browser # Install Brave Browser
printf -- '\033[33m Installing Brave Browser\n\033[37m' 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 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 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 update
sudo apt install -y brave-browser sudo apt install -y brave-browser
# Install Virtualbox # Install Virtualbox
printf -- '\033[33m Installing Virtualbox\n\033[37m' 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_2016.asc | gpg --dearmor >oracle_vbox_2016.gpg
curl https://www.virtualbox.org/download/oracle_vbox.asc | gpg --dearmor >oracle_vbox.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_2016.gpg /etc/apt/trusted.gpg.d/
sudo install -o root -g root -m 644 oracle_vbox.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 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 update
sudo apt install -y linux-headers-"$(uname -r)" dkms sudo apt install -y linux-headers-"$(uname -r)" dkms
sudo apt install virtualbox-7.1 -y 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 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 VBoxManage extpack install --replace Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack --accept-license=eb31505e56e9b4d0fbca139104da41ac6f6b98f8e78968bdf01b1f3da3c4f9ae
sudo usermod -a -G vboxusers "$USER" sudo usermod -a -G vboxusers "$USER"
printf -- '\033[33m Installing Audio control\n\033[37m' printf -- '\033[33m Installing Audio control\n\033[37m'
if [ $VER == "22.04" ]; then if [ $VER == "22.04" ]; then
# Install helvum # Install helvum
sudo apt install -y pavucontrol sudo apt install -y pavucontrol
fi fi
if [ $VER == "24.04" ]; then if [ $VER == "24.04" ]; then
# Install helvum # Install helvum
sudo apt install -y pavucontrol helvum sudo apt install -y pavucontrol helvum
fi fi
# Install timeshift # Install timeshift
printf -- '\033[33m Installing Timeshift\n\033[37m' printf -- '\033[33m Installing Timeshift\n\033[37m'
sudo apt install -y timeshift sudo apt install -y timeshift
fi fi
fi fi
# *** Dotfile symlinking *** # *** Dotfile symlinking ***
printf -- '\033[32m *** Dotfile symlinking ***\n\033[37m' printf -- '\033[32m *** Dotfile symlinking ***\n\033[37m'
if [ "$WSL" == "no" ]; then if [ "$WSL" == "no" ]; then
# Symlink wezterm config # Symlink wezterm config
printf -- '\033[33m Symlinking wezterm config\n\033[37m' printf -- '\033[33m Symlinking wezterm config\n\033[37m'
ln -sf ~/code_server/wezterm.lua ~/.wezterm.lua ln -sf ~/linuxbox/wezterm.lua ~/.wezterm.lua
fi fi
# Symlink nvim config # Symlink nvim config
printf -- '\033[33m Symlinking nvim config\n\033[37m' printf -- '\033[33m Symlinking nvim config\n\033[37m'
mkdir -p ~/.config/nvim 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 # Symlink git config
printf -- '\033[33m Symlinking git config\n\033[37m' printf -- '\033[33m Symlinking git config\n\033[37m'
if [ "$WSL" == "yes" ]; then if [ "$WSL" == "yes" ]; then
ln -sf ~/code_server/gitconfig.work ~/.gitconfig ln -sf ~/linuxbox/gitconfig.work ~/.gitconfig
else else
ln -sf ~/code_server/gitconfig ~/.gitconfig ln -sf ~/linuxbox/gitconfig ~/.gitconfig
fi fi
# Symlink tmux config # Symlink tmux config
printf -- '\033[33m Symlinking tmux config\n\033[37m' 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 # Symlink clang-format config
printf -- '\033[33m Symlinking clang-format config\n\033[37m' 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 # Symlink lazygit config
printf -- '\033[33m Symlinking lazygit config\n\033[37m' printf -- '\033[33m Symlinking lazygit config\n\033[37m'
mkdir -p ~/.config/lazygit 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 # Symlink starsihp config
printf -- '\033[33m Symlinking starship config\n\033[37m' 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 # Symlink luacheck config
printf -- '\033[33m Symlinking luacheck config\n\033[37m' printf -- '\033[33m Symlinking luacheck config\n\033[37m'
ln -sf ~/code_server/luacheckrc ~/.luacheckrc ln -sf ~/linuxbox/luacheckrc ~/.luacheckrc
# Symlink rp2040 flash script # Symlink rp2040 flash script
printf -- '\033[33m Symlinking rp2040 flash script\n\033[37m' printf -- '\033[33m Symlinking rp2040 flash script\n\033[37m'
mkdir -p ~/.local/bin 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 # Symlink blerc
printf -- '\033[33m Symlinking blerc config\n\033[37m' printf -- '\033[33m Symlinking blerc config\n\033[37m'
ln -sf ~/code_server/blerc ~/.blerc ln -sf ~/linuxbox/blerc ~/.blerc
# Symlink update script # Symlink update script
printf -- '\033[33m Symlinking update wrapper\n\033[37m' printf -- '\033[33m Symlinking update wrapper\n\033[37m'
mkdir -p ~/.local/bin 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 # Symlink bashrc
printf -- '\033[33m Symlinking bashrc config\n\033[37m' 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' printf -- '\033[32m \n\n***** Update complete! Please restart your terminal. *****\n\n\033[37m'

View File

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