diff --git a/.installer/packages b/.installer/packages index 8e25827..146dfbc 100644 --- a/.installer/packages +++ b/.installer/packages @@ -5,8 +5,9 @@ pacman-any:gst-libav phonon-qt5-gstreamer gst-plugins-good qt5-quickcontrols qt5 pacman-type-hasbattery:brightnessctl aur-any:picom-git sddm-theme-aerial-git -apt-base:acpi wget curl # Required for setup_system.sh +apt-base:acpi wget curl ca-certificates gnupg lsb-release # Required for setup_system.sh apt-any:i3 feh i3status nm-tray pasystray xautolock inotify-tools xss-lock fonts-noto-color-emoji fonts-hack-ttf xclip +apt-any:docker-ce docker-ce-cli containerd.io docker-compose-plugin apt-any:chromium-browser zsh tmux codium vim ufw scrot dunst arandr ranger thunar flameshot apt-any:libxext-dev libxcb1-dev libxcb-damage0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-composite0-dev libxcb-image0-dev libxcb-present-dev libxcb-xinerama0-dev libxcb-glx0-dev libpixman-1-dev libdbus-1-dev libconfig-dev libgl1-mesa-dev libpcre2-dev libpcre3-dev libevdev-dev uthash-dev libev-dev libx11-xcb-dev meson apt-any:python3 python3-pip diff --git a/setup_system.sh b/setup_system.sh index df1bc9c..be35c7e 100755 --- a/setup_system.sh +++ b/setup_system.sh @@ -5,6 +5,8 @@ # upgrade_packages=false +os_id="$(grep ^ID= /dev/null 2>&1 || exit 1 pwd -P @@ -285,12 +287,25 @@ function setup_arch() { # Setup for Debian-like systems # +function add_debian_keyring() { + local url="${1:?Missing key URL}" name="${2:?Missing key name}" + local file="/usr/share/keyrings/$name.gpg" + echo "Adding keyring for $name from $url." + wget -qO - "$url" | gpg --dearmor | sudo dd of="$file" + sudo chmod a+r "$file" +} + +function setup_debian_repo_docker() { + echo "Setting up repository for Docker." + add_debian_keyring "https://download.docker.com/linux/$os_id/gpg" docker || return 1 + echo "deb [ arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg ] https://download.docker.com/linux/$os_id $(lsb_release -cs) stable" | + sudo tee /etc/apt/sources.list.d/docker.list +} + function setup_debian_repo_vscodium() { echo "Setting up repository for VSCodium." - wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | - gpg --dearmor | - sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg - echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' | + add_debian_keyring https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg vscodium || return 1 + echo "deb [ signed-by=/usr/share/keyrings/vscodium.gpg ] https://download.vscodium.com/debs vscodium main" | sudo tee /etc/apt/sources.list.d/vscodium.list } @@ -315,37 +330,42 @@ function setup_debian_with_git() { function setup_debian() { setup_debian_base_with_apt || return 1 setup_debian_repo_vscodium || return 2 - setup_debian_with_apt || return 3 - setup_pip_packages || return 4 - setup_debian_with_git || return 5 - configure_sddm || return 6 - configure_ufw || return 7 - setup_homebrew || return 8 - setup_brew_formulas || return 9 - setup_krew || return 10 - setup_krew_plugins || return 11 - change_shell || return 12 + setup_debian_repo_docker || return 3 + setup_debian_with_apt || return 4 + setup_pip_packages || return 5 + setup_debian_with_git || return 6 + configure_sddm || return 7 + configure_ufw || return 8 + setup_homebrew || return 9 + setup_brew_formulas || return 10 + setup_krew || return 11 + setup_krew_plugins || return 12 + change_shell || return 13 } +# +# Main +# + if [ "$EUID" -eq 0 ]; then echo "Don't run this script as root." 1>&2 exit 2 fi -ID_LIKE="$(grep ID_LIKE=