Files
thingy/set-up-system.sh
T
2026-07-17 03:42:59 +01:00

62 lines
1.5 KiB
Bash

#!/usr/bin/env bash
set -e
sudo -v
function banner_top() {
echo -e "────┤ $1 ├────\n"
}
function banner_bottom() {
echo -e "\n────┤ $1 ├────\n\n\n"
}
# https://patorjk.com/software/taag/#p=display&f=Small+Slant
cat << 'EOF'
__ __ _
/ /_/ / (_)__ ___ ___ __
/ __/ _ \/ / _ \/ _ `/ // /
\__/_//_/_/_//_/\_, /\_, /
/___//___/
..... brought to you by futile
EOF
# configure dnf
banner_top "configuring dnf"
sudo tee /etc/dnf/dnf.conf << 'EOF'
[main]
defaultyes = True
max_parallel_downloads = 10
EOF
banner_bottom "configured dnf"
# update system
banner_top "updating system"
sudo dnf update -y
banner_bottom "updated system"
# install (& configure) docker
banner_top "installing docker"
sudo dnf config-manager addrepo --from-repofile https://download.docker.com/linux/fedora/docker-ce.repo --overwrite
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $(id -un)
sudo systemctl enable --now docker
sudo docker run hello-world
banner_bottom "installed docker"
# install (& configure) fish
banner_top "installing fish"
sudo dnf install -y fish
sudo chsh -s $(which fish) $(id -un)
fish -c "set -U fish_greeting"
fish -c "set -Ux EDITOR $(which micro)"
banner_bottom "installed fish"
# install misc
banner_top "installing other packages"
sudo dnf install -y micro btop fastfetch
banner_bottom "installed other packages"
# finish
banner_top "done! please log out and log back in"