From 51c2b2a49affc360f375656a8b4b9f0fcde9f240 Mon Sep 17 00:00:00 2001 From: Khoa Vo Date: Sat, 4 Jul 2026 18:20:36 +0700 Subject: [PATCH] fix(installer): support CachyOS and use usermod for group setup --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 22d0cdc..37eb162 100755 --- a/install.sh +++ b/install.sh @@ -34,7 +34,7 @@ install_runtime_deps() { fedora|rhel|centos) dnf install -y libevdev libX11 libXtst dbus-libs libwayland-client xclip wl-clipboard curl ;; - arch|manjaro) + arch|manjaro|cachyos|endeavouros|garuda|artix) pacman -Sy --needed --noconfirm libevdev libx11 libxtst dbus \ libwayland xclip wl-clipboard curl ;; @@ -163,7 +163,11 @@ EOF # User setup INSTALLING_USER="${SUDO_USER:-$USER}" if [ -n "$INSTALLING_USER" ] && [ "$INSTALLING_USER" != "root" ]; then - adduser "$INSTALLING_USER" input 2>/dev/null || true + if command -v usermod &>/dev/null; then + usermod -aG input "$INSTALLING_USER" 2>/dev/null || true + elif command -v adduser &>/dev/null; then + adduser "$INSTALLING_USER" input 2>/dev/null || true + fi rm -f "$(getent passwd "$INSTALLING_USER" | cut -d: -f6)/.config/vietc/config.toml" 2>/dev/null || true fi