#!/usr/bin/env bash set -e export DEBIAN_FRONTEND=noninteractive INSTALL_PREPARE="chrony tzdata ca-certificates openssl gpg dirmngr" INSTALL_UTILITY="fish cron tmux glances procps lsof vim zip unzip chafa rsync ncdu duf jq coreutils moreutils" INSTALL_NETWORK="curl httpie hey iproute2 mtr iputils-ping dnsutils tcpdump nmap socat netcat-openbsd" INSTALL_DEVELOP="gcc g++ make cmake binutils pkg-config libssl-dev perl git git-lfs docker.io docker-compose-v2" # setup if [ ! -f /.dockerenv ]; then sudo update-locale LANG=C.UTF-8 sudo update-locale LC_ALL=C.UTF-8 source /etc/default/locale fi sudo apt update sudo apt install -y $INSTALL_PREPARE $INSTALL_UTILITY $INSTALL_NETWORK $INSTALL_DEVELOP # tweak curl -fsSL https://bash.cc/setup/tmux.conf --create-dirs -o ~/.tmux.conf curl -fsSL https://bash.cc/setup/loadenv.fish --create-dirs -o ~/.config/fish/functions/loadenv.fish curl -fsSL https://bash.cc/setup/fish_prompt.fish --create-dirs -o ~/.config/fish/functions/fish_prompt.fish sudo curl -fsSL https://bash.cc/setup/sysctl.conf -o /etc/sysctl.d/99-tweak.conf LIMITS=$(curl -fsSL https://bash.cc/setup/limits.conf) echo "${LIMITS//\{CURRENT_USER\}/$(whoami)}" | sudo tee /etc/security/limits.d/99-tweak.conf >/dev/null if [ ! -f /.dockerenv ]; then sudo sysctl --system fi sudo chsh -s /usr/bin/fish "$(whoami)" fish -c "set -Ux fish_features qmark-noglob" fish -c "alias --save serve='python3 -m http.server'" git lfs install git config --global core.autocrlf false git config --global status.showUntrackedFiles all sudo mkdir -p /etc/docker sudo usermod -aG docker "$(whoami)" (cat /etc/docker/daemon.json 2>/dev/null || echo '{}') | jq '. + {"userland-proxy": false}' | sudo tee /etc/docker/daemon.json >/dev/null if [ ! -f /.dockerenv ]; then sudo systemctl daemon-reload sudo systemctl restart docker fi # final sudo mkdir -p /app sudo chown "$(whoami):$(id -gn)" /app echo "Done"