Files
omarchy/install/preflight/guard.sh
Ryan Hughes b97cba39af Login and UKI updates (#2242)
* Change DM to SDDM

* Move to custom named UKI

* Skip creation on Mac

* Add entry to make sure VSCode uses gnome keyring

* Fix order for UKI generation

* Limine only

* BTRFS only

* Add checks for possible issues

* Remove

* Add verification to omarchy-pkg-add and speed up installs

* Use omarchy-pkg-add

* Update files to include dirs

* Fix relaunch
2025-10-08 10:47:26 +02:00

47 lines
1.2 KiB
Bash

abort() {
echo -e "\e[31mOmarchy install requires: $1\e[0m"
echo
gum confirm "Proceed anyway on your own accord and without assistance?" || exit 1
}
# Must be an Arch distro
if [[ ! -f /etc/arch-release ]]; then
abort "Vanilla Arch"
fi
# Must not be an Arch derivative distro
for marker in /etc/cachyos-release /etc/eos-release /etc/garuda-release /etc/manjaro-release; do
if [[ -f "$marker" ]]; then
abort "Vanilla Arch"
fi
done
# Must not be running as root
if [ "$EUID" -eq 0 ]; then
abort "Running as root (not user)"
fi
# Must be x86 only to fully work
if [ "$(uname -m)" != "x86_64" ]; then
abort "x86_64 CPU"
fi
# Must have secure boot disabled
if bootctl status 2>/dev/null | grep -q 'Secure Boot: enabled'; then
abort "Secure Boot disabled"
fi
# Must not have Gnome or KDE already install
if pacman -Qe gnome-shell &>/dev/null || pacman -Qe plasma-desktop &>/dev/null; then
abort "Fresh + Vanilla Arch"
fi
# Must have limine installed
command -v limine &>/dev/null || abort "Limine bootloader"
# Must have btrfs root filesystem
[ "$(findmnt -n -o FSTYPE /)" = "btrfs" ] || abort "Btrfs root filesystem"
# Cleared all guards
echo "Guards: OK"