mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
install: split SDDM static config from autologin
This commit is contained in:
+18
-26
@@ -1,38 +1,30 @@
|
||||
# Install omarchy SDDM theme
|
||||
omarchy-refresh-sddm
|
||||
rm -rf /usr/share/sddm/themes/omarchy
|
||||
mkdir -p /usr/share/sddm/themes
|
||||
cp -r "$OMARCHY_PATH/default/sddm/omarchy" /usr/share/sddm/themes/omarchy
|
||||
|
||||
# Setup SDDM login service
|
||||
sudo mkdir -p /usr/local/share/wayland-sessions
|
||||
sudo cp "$OMARCHY_PATH/default/wayland-sessions/omarchy.desktop" /usr/local/share/wayland-sessions/omarchy.desktop
|
||||
sudo cp "$OMARCHY_PATH/default/sddm/hyprland.lua" /usr/share/sddm/hyprland.lua
|
||||
sudo rm -f /usr/share/sddm/hyprland.conf
|
||||
mkdir -p /usr/local/share/wayland-sessions
|
||||
cp -f "$OMARCHY_PATH/default/wayland-sessions/omarchy.desktop" /usr/local/share/wayland-sessions/omarchy.desktop
|
||||
cp -f "$OMARCHY_PATH/default/sddm/hyprland.lua" /usr/share/sddm/hyprland.lua
|
||||
rm -rf /usr/share/sddm/hyprland.conf
|
||||
|
||||
sudo mkdir -p /etc/sddm.conf.d
|
||||
cat <<EOF | sudo tee /etc/sddm.conf.d/10-wayland.conf >/dev/null
|
||||
[General]
|
||||
DisplayServer=wayland
|
||||
|
||||
[Wayland]
|
||||
CompositorCommand=start-hyprland -- --config /usr/share/sddm/hyprland.lua
|
||||
EOF
|
||||
|
||||
if [[ ! -f /etc/sddm.conf.d/autologin.conf ]]; then
|
||||
cat <<EOF | sudo tee /etc/sddm.conf.d/autologin.conf
|
||||
mkdir -p /etc/sddm.conf.d
|
||||
autologin_conf=/etc/sddm.conf.d/autologin.conf
|
||||
if [[ ! -f $autologin_conf ]]; then
|
||||
cat > "$autologin_conf" <<EOF
|
||||
[Autologin]
|
||||
User=$USER
|
||||
User=${OMARCHY_INSTALL_USER:-${USER:-}}
|
||||
Session=omarchy
|
||||
|
||||
[Theme]
|
||||
Current=omarchy
|
||||
EOF
|
||||
else
|
||||
sudo sed -i 's/^Session=hyprland-uwsm$/Session=omarchy/' /etc/sddm.conf.d/autologin.conf
|
||||
sed -i 's/^Session=hyprland-uwsm$/Session=omarchy/' "$autologin_conf"
|
||||
sed -i '/^\[Theme\]$/,/^$/d' "$autologin_conf"
|
||||
fi
|
||||
|
||||
# Prevent password-based SDDM logins from creating an encrypted login keyring
|
||||
# (which conflicts with the passwordless Default_keyring used for auto-unlock)
|
||||
sudo sed -i '/-auth.*pam_gnome_keyring\.so/d' /etc/pam.d/sddm
|
||||
sudo sed -i '/-password.*pam_gnome_keyring\.so/d' /etc/pam.d/sddm
|
||||
|
||||
# Don't use chrootable here as --now will cause issues for manual installs
|
||||
sudo systemctl enable sddm.service
|
||||
if [[ -f /etc/pam.d/sddm ]]; then
|
||||
sed -i '/-auth.*pam_gnome_keyring\.so/d' /etc/pam.d/sddm
|
||||
sed -i '/-password.*pam_gnome_keyring\.so/d' /etc/pam.d/sddm
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user