EDIT/ADD FastFetch install move to APT, DanOS Github to git.itmail.dk

This commit is contained in:
2025-09-07 08:29:21 +02:00
parent 8c700dae4d
commit 5290f0c412

View File

@@ -39,14 +39,14 @@ function start_installation() {
VERSION_CODENAME_SHOULD_NOT_BE=codename-her
else
echo -e "${RED} This installation should only be run on a Debian Linux System. ${NC}"
echo -e "${RED} See more at https://github.com/ITmail-dk/danos/ ${NC}"
echo -e "${RED} See more at https://git.itmail.dk/mara/danos/ ${NC}"
exit 1
fi
# shellcheck disable=SC1091
echo -e "${GREEN} ${NC}"
echo -e "${GREEN} "
echo -e "${GREEN} Starting the DanOS installation"
echo -e "${GREEN} See more info at https://github.com/ITmail-dk/danos/"
echo -e "${GREEN} See more info at https://git.itmail.dk/mara/danos/"
echo -e "${GREEN} Enter your user password, to continue if necessary"
echo -e "${GREEN} Or CTRL + C to cancel the installation"
echo -e "${GREEN} "
@@ -67,7 +67,7 @@ function start_installation() {
# DanOS git clone
cd /tmp/ || exit
git clone --depth 1 https://github.com/ITmail-dk/danos.git
git clone --depth 1 https://git.itmail.dk/mara/danos.git
# danos to usr/bin
sudo cp -fu danos/install.sh /usr/bin/danos
@@ -192,7 +192,7 @@ function start_installation() {
# Sudoers ------------------------------------------------------------------------------------------------------------------------------------
# Add User NOPASSWD to shutdown now and reboot
echo "$USER ALL=(ALL) NOPASSWD: /sbin/shutdown now, /sbin/reboot, /usr/bin/systemctl suspend, /usr/bin/systemctl hibernate, /usr/bin/yazi" | sudo tee -a /etc/sudoers.d/"$USER" && sudo visudo -c -f /etc/sudoers.d/"$USER"
echo "$USER ALL=(ALL) NOPASSWD: /sbin/shutdown now, /sbin/reboot, /usr/bin/systemctl suspend, /usr/bin/systemctl hibernate, /usr/bin/yazi, /usr/bin/mc" | sudo tee -a /etc/sudoers.d/"$USER" && sudo visudo -c -f /etc/sudoers.d/"$USER"
check_error "Sudo User NOPASSWD to shutdown now and reboot"
# Set sudo password timeout
@@ -209,7 +209,7 @@ function start_installation() {
# -------------------------------------------------------------------------------------------------
# Core System APT install
sudo DEBIAN_FRONTEND=noninteractive apt -y --ignore-missing install bash-completion xserver-xorg x11-utils xinit polkitd pkexec lxpolkit acl arandr autorandr picom fwupd colord mesa-utils htop wget curl git tmux numlockx kitty neovim xdg-utils ufw gufw cups cups-common lm-sensors fancontrol xbacklight brightnessctl unzip network-manager bind9-dnsutils dunst libnotify-bin notify-osd xsecurelock pm-utils rofi 7zip jq poppler-utils fd-find ripgrep zoxide imagemagick nsxiv mpv flameshot mc thunar gvfs gvfs-backends parted gparted mpd mpc ncmpcpp fzf ccrypt xarchiver notepadqq font-manager fontconfig fontconfig-config fonts-recommended fonts-liberation fonts-freefont-ttf fonts-noto-core libfontconfig1 pipewire pipewire-audio pipewire-alsa pipewire-pulse pipewire-jack wireplumber libspa-0.2-bluetooth pavucontrol playerctl alsa-utils qpwgraph sddm-theme-breeze ffmpeg build-essential dkms cmake remmina libreoffice linux-cpupower plymouth plymouth-themes keynav yt-dlp qalculate-gtk xss-lock power-profiles-daemon
sudo DEBIAN_FRONTEND=noninteractive apt -y --ignore-missing install bash-completion xserver-xorg x11-utils xinit polkitd pkexec lxpolkit acl arandr autorandr picom fwupd colord mesa-utils htop wget curl git tmux numlockx kitty neovim xdg-utils ufw gufw cups cups-common lm-sensors fancontrol fastfetch xbacklight brightnessctl unzip network-manager bind9-dnsutils dunst libnotify-bin notify-osd xsecurelock pm-utils rofi 7zip jq poppler-utils fd-find ripgrep zoxide imagemagick nsxiv mpv flameshot mc thunar gvfs gvfs-backends parted gparted mpd mpc ncmpcpp fzf ccrypt xarchiver notepadqq font-manager fontconfig fontconfig-config fonts-recommended fonts-liberation fonts-freefont-ttf fonts-noto-core libfontconfig1 pipewire pipewire-audio pipewire-alsa pipewire-pulse pipewire-jack wireplumber libspa-0.2-bluetooth pavucontrol playerctl alsa-utils qpwgraph sddm-theme-breeze ffmpeg build-essential dkms cmake remmina libreoffice linux-cpupower plymouth plymouth-themes keynav yt-dlp qalculate-gtk xss-lock power-profiles-daemon
sudo DEBIAN_FRONTEND=noninteractive apt -y --ignore-missing install linux-headers-"$(uname -r)"
sudo DEBIAN_FRONTEND=noninteractive apt -y install sddm --no-install-recommends
@@ -417,7 +417,7 @@ MCINI
sudo python3 -m venv qtile_venv
sudo chmod -R 777 qtile_venv
cd qtile_venv || exit
git clone --depth 1 https://github.com/ITmail-dk/danos.git
git clone --depth 1 https://git.itmail.dk/mara/danos.git
git clone --depth 1 https://github.com/qtile/qtile.git --branch v0.32.0 # Specific version of Qtile
# shellcheck disable=SC1091
source /opt/qtile_venv/bin/activate
@@ -437,7 +437,7 @@ MCINI
sudo mkdir qtile_venv
sudo chmod -R 777 qtile_venv && cd qtile_venv || exit
#git clone --depth 1 https://github.com/qtile/qtile.git # The latest version of Qtile
git clone --depth 1 https://github.com/ITmail-dk/danos.git
git clone --depth 1 https://git.itmail.dk/mara/danos.git
sudo cp -fu danos/install.sh /usr/bin/danos
sudo chmod +x /usr/bin/danos
uv tool install qtile # The latest version of Qtile via UV
@@ -1418,11 +1418,11 @@ XFCE4HELPER
# ---------------------------------------------------------------------------------------
cd /tmp/ || exit
# FastFetch Install.
FASTFETCH_VERSION=$(curl -s "https://api.github.com/repos/fastfetch-cli/fastfetch/releases/latest" | grep '"tag_name"' | awk -F'"' '{print $4}')
wget https://github.com/fastfetch-cli/fastfetch/releases/download/"$FASTFETCH_VERSION"/fastfetch-linux-amd64.deb && sudo dpkg -i fastfetch-linux-amd64.deb && rm fastfetch-linux-amd64.deb
clear #Clear the screen
check_error "FastFetch install"
# FastFetch Install. (Is in APT)
#FASTFETCH_VERSION=$(curl -s "https://api.github.com/repos/fastfetch-cli/fastfetch/releases/latest" | grep '"tag_name"' | awk -F'"' '{print $4}')
#wget https://github.com/fastfetch-cli/fastfetch/releases/download/"$FASTFETCH_VERSION"/fastfetch-linux-amd64.deb && sudo dpkg -i fastfetch-linux-amd64.deb && rm fastfetch-linux-amd64.deb
#clear #Clear the screen
#check_error "FastFetch install"
# WaterFox install - https://www.waterfox.net/download/
WATERFOX_VERSION=$(curl -s "https://api.github.com/repos/BrowserWorks/waterfox/releases/latest" | grep '"tag_name"' | awk -F'"' '{print $4}')
@@ -1567,8 +1567,35 @@ function update_danos() {
curl -LsSf https://astral.sh/uv/install.sh | sh # Install UV Python package manager.
source "$HOME"/.local/bin/env
fi
check_error() {
if [ $? -ne 0 ]; then
echo -e "${RED} An error occurred during installation and has been stopped. ${NC}"
echo -e "${RED} Or you have pressed CTRL + C to cancel. ${NC}"
echo -e "${RED} Error occurred during $1 ${NC}"
exit 1
fi
}
cd /opt || exit
# Check for Bluetooth hardware using lsusb
if lsusb | grep -iq bluetooth; then
echo "Bluetooth detected, Installing required packages..."
sudo DEBIAN_FRONTEND=noninteractive apt install -y bluetooth bluez bluez-cups bluez-obexd bluez-meshd pulseaudio-module-bluetooth bluez-firmware blueman
fi
clear #Clear the screen
check_error "Check for Bluetooth hardware and install"
# Check for Logitech hardware using lsusb
# Solaar - Logitech Unifying Receiver - Accessory management for Linux.
if lsusb | grep -iq Logitech; then
echo "Logitech detected, Installing required packages..."
sudo DEBIAN_FRONTEND=noninteractive apt install -y solaar
fi
clear #Clear the screen
check_error "Check for Logitech hardware and install"
#Get the VERSION_CODENAME
OS_VERSION_FOR_APT=$(lsb_release -cs)
case "$OS_VERSION_FOR_APT" in
@@ -1595,7 +1622,7 @@ function update_danos() {
sudo python3 -m venv qtile_venv
sudo chmod -R 777 qtile_venv
cd qtile_venv || exit
git clone --depth 1 https://github.com/ITmail-dk/danos.git
git clone --depth 1 https://git.itmail.dk/mara/danos.git
git clone --depth 1 https://github.com/qtile/qtile.git --branch v0.32.0 # Specific version of Qtile
# shellcheck disable=SC1091
source /opt/qtile_venv/bin/activate
@@ -1619,7 +1646,7 @@ function update_danos() {
sudo mkdir qtile_venv
sudo chmod -R 777 qtile_venv && cd qtile_venv || exit
#git clone --depth 1 https://github.com/qtile/qtile.git # The latest version of Qtile
git clone --depth 1 https://github.com/ITmail-dk/danos.git
git clone --depth 1 https://git.itmail.dk/mara/danos.git
sudo cp -fu danos/install.sh /usr/bin/danos
sudo chmod +x /usr/bin/danos
uv tool install qtile --force # The latest version of Qtile via UV