Phase 2: Bootloader improvements - Add bootloader choice: systemd-boot (default) or Limine - Configure Limine with classical theme colors: - Dark brown background (#1a1611) - Tan text (#d4c4a8) - Gold accents (#d4a857) - Add Plymouth boot splash option - Update installer to prompt for bootloader choice - Add example-limine configuration - Update documentation with boot options Users can now choose between: 1. systemd-boot - Simple, reliable, well-tested (default) 2. Limine - Modern, prettier, themed to match Nomarchy Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
101 lines
2.5 KiB
Nix
101 lines
2.5 KiB
Nix
# Boot configuration
|
|
# Supports systemd-boot (default) and Limine (optional)
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
nomarchyConfig,
|
|
...
|
|
}: let
|
|
bootloader = nomarchyConfig.bootloader or "systemd-boot";
|
|
useLimine = bootloader == "limine";
|
|
useSystemdBoot = bootloader == "systemd-boot";
|
|
|
|
# Theme colors for Limine
|
|
theme = config.nomarchy.theme or (import ../../themes/classical/colors.nix);
|
|
in {
|
|
# Systemd-boot (default - simpler, well-tested)
|
|
boot.loader.systemd-boot = lib.mkIf useSystemdBoot {
|
|
enable = true;
|
|
configurationLimit = 10;
|
|
editor = false; # Disable editor for security
|
|
};
|
|
|
|
# EFI variables - needed for both bootloaders
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
# Limine bootloader (optional - prettier, more features)
|
|
boot.loader.limine = lib.mkIf useLimine {
|
|
enable = true;
|
|
|
|
# Support both BIOS and UEFI
|
|
efiSupport = true;
|
|
biosSupport = true;
|
|
|
|
# Max generations to show
|
|
maxGenerations = 10;
|
|
|
|
# Disable editor for security (can be overridden)
|
|
enableEditor = false;
|
|
|
|
# Validate boot files
|
|
validateChecksums = true;
|
|
panicOnChecksumMismatch = false;
|
|
|
|
# Styling
|
|
style = {
|
|
# Background color (dark brown from classical theme)
|
|
backdrop = "1a1611";
|
|
|
|
# Wallpaper style
|
|
wallpaperStyle = "stretched";
|
|
|
|
# Boot wallpaper (optional - can be set by user)
|
|
wallpapers = lib.mkIf (builtins.pathExists ../../themes/classical/wallpapers/boot.png) [
|
|
../../themes/classical/wallpapers/boot.png
|
|
];
|
|
|
|
# Graphical terminal settings
|
|
graphicalTerminal = {
|
|
# Font (Limine uses built-in fonts)
|
|
# Background color (RRGGBB)
|
|
background = "1a1611";
|
|
# Foreground/text color
|
|
foreground = "d4c4a8";
|
|
# Bright foreground
|
|
brightForeground = "d4a857";
|
|
};
|
|
|
|
# Interface styling
|
|
interface = {
|
|
# Resolution (empty = auto)
|
|
resolution = "";
|
|
# Branding colors
|
|
brandingColor = "d4a857"; # Gold accent
|
|
};
|
|
};
|
|
|
|
# Extra config for branding
|
|
extraConfig = ''
|
|
# Nomarchy Bootloader
|
|
TIMEOUT=5
|
|
GRAPHICS=yes
|
|
VERBOSE=no
|
|
'';
|
|
};
|
|
|
|
# Kernel parameters (applied regardless of bootloader)
|
|
boot.kernelParams = [
|
|
"quiet"
|
|
"splash"
|
|
"loglevel=3"
|
|
"udev.log_level=3"
|
|
];
|
|
|
|
# Plymouth boot splash (optional, works with both bootloaders)
|
|
boot.plymouth = lib.mkIf (nomarchyConfig.enablePlymouth or false) {
|
|
enable = true;
|
|
theme = "bgrt"; # Uses system logo
|
|
};
|
|
}
|