Initial commit: DarkForge Linux — Phases 0-12
Complete from-scratch Linux distribution targeting AMD Ryzen 9 9950X3D + NVIDIA RTX 5090 on ASUS ROG CROSSHAIR X870E HERO. Deliverables: - dpack: custom package manager in Rust (3,800 lines) - TOML package parser, dependency resolver, build sandbox - CRUX Pkgfile and Gentoo ebuild converters - Shared library conflict detection - 124 package definitions across 4 repos (core/extra/desktop/gaming) - 34 toolchain bootstrap scripts (LFS 13.0 adapted for Zen 5) - Linux 6.19.8 kernel config (hardware-specific, fully commented) - SysVinit init system with rc.d service scripts - Live ISO builder (UEFI-only, squashfs+xorriso) - Interactive installer (GPT partitioning, EFISTUB boot) - Integration test checklist (docs/TESTING.md) No systemd. No bootloader. No display manager. Kernel boots via EFISTUB → auto-login → dwl Wayland compositor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
51
src/install/modules/user.sh
Executable file
51
src/install/modules/user.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux Installer — User Module
|
||||
# ============================================================================
|
||||
# Creates root password and user account.
|
||||
# Default: username 'danny', added to wheel/video/audio/input groups.
|
||||
# ============================================================================
|
||||
|
||||
INSTALL_USERNAME=""
|
||||
INSTALL_HOSTNAME=""
|
||||
|
||||
setup_users() {
|
||||
# --- Hostname ---
|
||||
ask "Hostname [darkforge]: "
|
||||
read -r INSTALL_HOSTNAME
|
||||
INSTALL_HOSTNAME="${INSTALL_HOSTNAME:-darkforge}"
|
||||
export INSTALL_HOSTNAME
|
||||
|
||||
# --- Root password ---
|
||||
echo ""
|
||||
info "Set the root password:"
|
||||
chroot "${MOUNT_POINT}" /bin/bash -c "passwd root"
|
||||
|
||||
# --- User account ---
|
||||
echo ""
|
||||
ask "Username [danny]: "
|
||||
read -r INSTALL_USERNAME
|
||||
INSTALL_USERNAME="${INSTALL_USERNAME:-danny}"
|
||||
export INSTALL_USERNAME
|
||||
|
||||
info "Creating user '${INSTALL_USERNAME}'..."
|
||||
|
||||
chroot "${MOUNT_POINT}" /bin/bash -c "
|
||||
useradd -m -G wheel,video,audio,input,kvm -s /bin/zsh '${INSTALL_USERNAME}'
|
||||
"
|
||||
|
||||
info "Set password for '${INSTALL_USERNAME}':"
|
||||
chroot "${MOUNT_POINT}" /bin/bash -c "passwd '${INSTALL_USERNAME}'"
|
||||
|
||||
# Install user shell profile
|
||||
if [ -f "/install/configs/zprofile" ]; then
|
||||
cp "/install/configs/zprofile" "${MOUNT_POINT}/home/${INSTALL_USERNAME}/.zprofile"
|
||||
chroot "${MOUNT_POINT}" chown "${INSTALL_USERNAME}:${INSTALL_USERNAME}" "/home/${INSTALL_USERNAME}/.zprofile"
|
||||
fi
|
||||
|
||||
# Update inittab with the correct username for auto-login
|
||||
sed -i "s/--autologin danny/--autologin ${INSTALL_USERNAME}/" \
|
||||
"${MOUNT_POINT}/etc/inittab"
|
||||
|
||||
ok "User '${INSTALL_USERNAME}' created"
|
||||
}
|
||||
Reference in New Issue
Block a user