Add Limine bootloader support with themed styling
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>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Boot configuration
|
||||
# Supports both systemd-boot (default) and Limine
|
||||
# Supports systemd-boot (default) and Limine (optional)
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
@@ -7,19 +7,94 @@
|
||||
nomarchyConfig,
|
||||
...
|
||||
}: let
|
||||
# For ISO builds, we'll use Limine; for regular installs, systemd-boot
|
||||
useSystemdBoot = nomarchyConfig.bootloader or "systemd-boot" == "systemd-boot";
|
||||
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 for NixOS installs)
|
||||
# Systemd-boot (default - simpler, well-tested)
|
||||
boot.loader.systemd-boot = lib.mkIf useSystemdBoot {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
editor = false; # Disable editor for security
|
||||
};
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = useSystemdBoot;
|
||||
# EFI variables - needed for both bootloaders
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Limine support (for ISO)
|
||||
boot.loader.limine = lib.mkIf (!useSystemdBoot) {
|
||||
# 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
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user