2026-02-05 18:05:06 -05:00

74 lines
2.4 KiB
Markdown

# Gentoo Legion Installer
Automated Gentoo Linux installer for Lenovo Legion laptops with AMD + NVIDIA hybrid graphics.
## Features
- **Python-based installer** with idempotent operations (safe to re-run)
- **LUKS2 encryption** with Btrfs subvolumes
- **Hybrid GPU support** (AMD iGPU + NVIDIA dGPU)
- **OpenRC** init system
- **Hyprland** desktop environment (optional)
- **Fingerprint authentication** for Elan readers (optional)
## Hardware
Tested on Legion S7 15ACH6:
- AMD Ryzen 9 5900HX
- AMD Radeon Vega (iGPU)
- NVIDIA GeForce RTX 3050 Ti Mobile (dGPU)
Should work on other Legion models with similar hardware.
## Quick Start
```bash
# Boot Gentoo live environment, then:
git clone https://github.com/<your-username>/gentoo-legion-python /root/gentoo
cd /root/gentoo
python setup.py --install
```
See [procedure.md](procedure.md) for complete installation guide.
## Repository Structure
```
.
├── setup.py # Main installer entry point
├── procedure.md # Complete installation guide
├── install/ # Python installer modules
│ ├── disk.py # LUKS + Btrfs setup
│ ├── stage3.py # Stage3 download/extract
│ ├── sync.py # Portage sync, profile, locale
│ ├── services.py # OpenRC services setup
│ ├── users.py # User creation, shell config
│ ├── nvidia.py # NVIDIA driver setup
│ ├── bootloader.py # GRUB installation
│ └── fingerprint.py # Fingerprint auth (optional)
├── portage/ # Portage configuration
│ ├── make.conf
│ ├── package.use/
│ ├── package.accept_keywords/
│ └── sets/ # @hyprland package set
├── dracut.conf.d/ # Initramfs configs
├── conf.d/ # OpenRC service configs
├── iptables/ # Firewall rules
├── hypr/ # Hyprland configs
├── .zshrc # Shell configuration
└── starship.toml # Prompt theme
```
## Customization
Before running, you may want to customize:
1. **portage/make.conf** - CPU flags, mirrors, features
2. **install/sync.py** - Timezone, locale, hostname
3. **install/disk.py** - Swap size, partition layout
4. **iptables/*.rules** - Firewall rules for your network
## License
MIT License - See [LICENSE](LICENSE)