Add Debian support.

This commit is contained in:
dabruh 2022-06-07 12:11:19 +02:00
parent 0c073fc41e
commit 132dc857e3
2 changed files with 91 additions and 0 deletions

View File

@ -3,3 +3,13 @@ pacman-any:gst-libav,phonon-qt5-gstreamer,gst-plugins-good,qt5-quickcontrols,qt5
pacman-any:code,vim,ufw pacman-any:code,vim,ufw
pacman-laptop:brightnessctl pacman-laptop:brightnessctl
aur-any:picom-git,flashfocus-git,sddm-theme-aerial-git aur-any:picom-git,flashfocus-git,sddm-theme-aerial-git
apt-any:i3-gaps,feh,i3status,nm-tray,pasystray,xautolock,inotify-tools,xss-lock,fonts-noto-color-emoji
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
apt-any:libxcb-render0-dev,libffi-dev,python-dev,python-cffi
apt-any:sddm,gstreamer1.0-libav,phonon4qt5-backend-gstreamer,gstreamer1.0-plugins-good,qml-module-qtquick-controls,qml-module-qtgraphicaleffects,qml-module-qtmultimedia,qt5-default
apt-any:codium,vim,ufw
apt-laptop:brightnessctl
pip-any:flashfocus

View File

@ -92,6 +92,18 @@ function setup_arch_with_yay() {
done done
} }
function install_sddm_aerial_theme() {
local theme_dir="/usr/share/sddm/themes/aerial"
[ -d "$theme_dir" ] && return
echo "Installing SDDM Aerial theme."
git clone https://github.com/3ximus/aerial-sddm-theme.git /tmp/aerial
sudo mv /tmp/aerial "$theme_dir"
sudo chown -R root:root "$theme_dir"
}
function configure_sddm() { function configure_sddm() {
local sddm_config_dir="/etc/sddm.conf.d" local sddm_config_dir="/etc/sddm.conf.d"
local theme_dir="/usr/share/sddm/themes/aerial" local theme_dir="/usr/share/sddm/themes/aerial"
@ -135,12 +147,81 @@ function setup_arch() {
configure_ufw || return 5 configure_ufw || return 5
} }
function setup_debian_repo_i3gaps() {
echo "Setting up repository for i3-gaps."
sudo add-apt-repository -y ppa:regolith-linux/release
}
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' |
sudo tee /etc/apt/sources.list.d/vscodium.list
}
function prepare_debian() {
setup_debian_repo_i3gaps || return 1
setup_debian_repo_vscodium || return 2
}
function setup_debian_with_apt() {
local targets=("apt-any") packages
is_laptop && targets+=("apt-laptop")
packages="$(get_packages "${targets[@]}")"
sudo apt-get update
# shellcheck disable=SC2086
sudo apt-get install $packages -y || return 1
}
function setup_debian_from_pip(){
local targets=("pip-any") packages
packages="$(get_packages "${targets[@]}")"
# shellcheck disable=SC2086
sudo pip3 install $packages --no-input || return 1
}
function install_picom() {
local tmp=/tmp/picom
echo "Installing Picom."
rm -Rf "$tmp"
git clone https://github.com/yshui/picom.git "$tmp" || return 1
cd "$tmp" || return 2
git submodule update --init --recursive || return 3
meson --buildtype=release . build || return 4
ninja -C build || return 5
sudo ninja -C build install || return 6
cd || return 7
rm -Rf "$tmp"
}
function setup_debian_from_git() {
install_picom || return 1
install_sddm_aerial_theme || return 2
}
function setup_debian() {
prepare_debian || return 1
setup_debian_with_apt || return 2
setup_debian_from_pip || return 3
setup_debian_from_git || return 4
configure_sddm || return 5
configure_ufw || return 6
}
ID_LIKE="$(grep ID_LIKE= </etc/os-release | cut -d= -f2)" ID_LIKE="$(grep ID_LIKE= </etc/os-release | cut -d= -f2)"
echo "Setting up ${ID_LIKE^:?}-like OS." echo "Setting up ${ID_LIKE^:?}-like OS."
if [[ "$ID_LIKE" == "arch" ]]; then if [[ "$ID_LIKE" == "arch" ]]; then
setup_arch setup_arch
elif [[ "$ID_LIKE" == "debian" ]]; then
setup_debian
else else
echo "ERROR: Unsupported system: ID_LIKE=$ID_LIKE" echo "ERROR: Unsupported system: ID_LIKE=$ID_LIKE"
exit 2 exit 2