Migrated desktop environment from XFCE to KDE Plasma with simplified profiles.

- Replaced XFCE with KDE Plasma and SDDM display manager.
- Reduced profiles from seven to four (minimal, server, basic, office).
- Split home skeleton files into home-skel and home-skel-desktop directories.
- Added display name prompt during user setup.
- Added 7zip and fwupd to base packages.
This commit is contained in:
2026-01-17 23:02:10 -05:00
parent 63833f6da3
commit 14f7b610bb
32 changed files with 224 additions and 727 deletions

49
lib/desktop/kde.sh Normal file
View File

@@ -0,0 +1,49 @@
#!/bin/bash
# Copyright 2026 Logan Fick
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# kde.sh - KDE Plasma desktop environment installation
#
# Installs KDE Plasma with SDDM display manager.
# KDE_PACKAGES is defined in config/profiles.conf.
# Install KDE base packages
install_kde_packages() {
chroot_pacman_install "${KDE_PACKAGES[@]}"
}
# Copy desktop skeleton files to user home
# Arguments:
# $1 - username
copy_desktop_skel() {
local username="$1"
local home_dir="${MOUNT_POINT}/home/${username}"
cp -r "${HOME_SKEL_DESKTOP_DIR}/." "${home_dir}/"
rm -f "${home_dir}/.gitkeep"
chown -R 1000:1000 "${home_dir}"
}
# Full KDE installation
# Arguments:
# $1 - username
install_kde() {
local username="$1"
install_kde_packages
chroot_systemd_enable sddm.service
copy_desktop_skel "$username"
chroot_run usermod -aG wireshark "$username"
}

View File

@@ -1,70 +0,0 @@
#!/bin/bash
# Copyright 2026 Logan Fick
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# xfce.sh - XFCE desktop environment installation
#
# Installs XFCE4 with LightDM and copies pre-configured user settings.
# XFCE_PACKAGES is defined in config/profiles.conf.
# Install XFCE base packages
install_xfce_packages() {
chroot_pacman_install "${XFCE_PACKAGES[@]}"
}
# Configure LightDM greeter
configure_lightdm() {
chroot_run sh -c "cat > /etc/lightdm/lightdm-gtk-greeter.conf" <<EOF
[greeter]
hide-user-image = true
font-name = Noto Sans 10
clock-format = %A, %B %d, %Y,%l:%M:%S %p
theme-name = Adwaita-dark
icon-theme-name = Papirus-Dark
screensaver-timeout = 10
user-background = false
background = #77767b
indicators = ~host;~spacer;~clock;~spacer;~power
EOF
}
# Copy default XFCE configuration to user home
# Arguments:
# $1 - username
copy_xfce_config() {
local username="$1"
local home_dir="${MOUNT_POINT}/home/${username}"
cp -r "${HOME_CONFIG_DIR}" "${home_dir}/.config"
# Disable tumblerd (thumbnail service)
mkdir -p "${home_dir}/.config/systemd/user"
ln -s /dev/null "${home_dir}/.config/systemd/user/tumblerd.service"
# Set correct ownership (UID 1000 is typically first user)
chown -R 1000:1000 "${home_dir}/.config"
}
# Full XFCE installation
# Arguments:
# $1 - username
install_xfce() {
local username="$1"
install_xfce_packages
chroot_systemd_enable lightdm.service
configure_lightdm
copy_xfce_config "$username"
}

View File

@@ -33,13 +33,39 @@ prompt_username() {
done
}
# Prompt for display name
# Sets:
# DISPLAY_NAME - the entered display name (empty if skipped)
prompt_display_name() {
prompt "Please enter your display name, or press Enter to skip (e.g., John Smith):" DISPLAY_NAME
}
# Copy base skeleton files to user home
# Arguments:
# $1 - username
copy_home_skel() {
local username="$1"
local home_dir="${MOUNT_POINT}/home/${username}"
cp -r "${HOME_SKEL_DIR}/." "${home_dir}/"
rm -f "${home_dir}/.gitkeep"
chown -R 1000:1000 "${home_dir}"
}
# Create a user account
# Arguments:
# $1 - username
# $2 - display name (optional)
create_user() {
local username="$1"
local display_name="${2:-}"
chroot_run useradd -m -G wheel "$username"
if [[ -n "$display_name" ]]; then
chroot_run useradd -m -G wheel -c "$display_name" "$username"
else
chroot_run useradd -m -G wheel "$username"
fi
copy_home_skel "$username"
}
# Set password for a user
@@ -55,8 +81,10 @@ set_user_password() {
# Full user setup
# Sets:
# USERNAME - the created username
# DISPLAY_NAME - the user's display name
setup_user() {
prompt_username
create_user "$USERNAME"
prompt_display_name
create_user "$USERNAME" "$DISPLAY_NAME"
set_user_password "$USERNAME"
}