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:
2026-02-15 02:50:48 -05:00
parent 58e4232f2f
commit 6686a9f6b6
5 changed files with 140 additions and 10 deletions

View File

@@ -27,6 +27,8 @@ Download the ISO from the releases page and boot from it for a fresh installatio
- **SwayNC** - Notification center - **SwayNC** - Notification center
- **Neovim** - Fully configured with LSP support - **Neovim** - Fully configured with LSP support
- **Classical Theme** - Earthy, vintage aesthetic inspired by historical paintings - **Classical Theme** - Earthy, vintage aesthetic inspired by historical paintings
- **Bootloader Choice** - systemd-boot (default) or Limine (prettier, more features)
- **Plymouth** - Optional boot splash screen
## Keybindings ## Keybindings

View File

@@ -31,6 +31,10 @@ Your configuration lives in `~/.config/nomarchy/config.nix`:
# Performance (security tradeoff!) # Performance (security tradeoff!)
enableMitigationsOff = false; enableMitigationsOff = false;
# Boot
bootloader = "systemd-boot"; # or "limine" for prettier boot
enablePlymouth = false; # Boot splash screen
# Theme # Theme
theme = "classical"; theme = "classical";
} }

View File

@@ -57,14 +57,17 @@
# Performance (security-conscious defaults) # Performance (security-conscious defaults)
enableMitigationsOff = false; # Opt-in only enableMitigationsOff = false; # Opt-in only
# Boot
bootloader = "systemd-boot"; # or "limine"
enablePlymouth = false; # Boot splash
# Theme # Theme
theme = "classical"; theme = "classical";
}; };
in { in {
# NixOS configurations # NixOS configurations
nixosConfigurations = { nixosConfigurations = {
# Example configuration (requires hardware-configuration.nix) # Example configuration with systemd-boot (default)
# Users create their own configuration via the installer
example = mkHost { example = mkHost {
system = "x86_64-linux"; system = "x86_64-linux";
config = defaultConfig // { config = defaultConfig // {
@@ -73,7 +76,24 @@
extraModules = [ extraModules = [
# Minimal test hardware config # Minimal test hardware config
({...}: { ({...}: {
boot.loader.systemd-boot.enable = true; fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
})
];
};
# Example configuration with Limine bootloader
example-limine = mkHost {
system = "x86_64-linux";
config = defaultConfig // {
hostname = "nomarchy-limine";
bootloader = "limine";
enablePlymouth = true;
};
extraModules = [
({...}: {
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/nixos"; device = "/dev/disk/by-label/nixos";
fsType = "ext4"; fsType = "ext4";

View File

@@ -117,6 +117,28 @@ prompt_location() {
echo "" echo ""
} }
prompt_bootloader() {
echo -e "${BOLD}Bootloader${NC}"
echo "1) systemd-boot (default) - Simple, reliable, well-tested"
echo "2) Limine - Modern, prettier, themed to match Nomarchy"
read -rp "Choose bootloader [1/2]: " bootloader_choice
bootloader_choice="${bootloader_choice:-1}"
if [[ "$bootloader_choice" == "2" ]]; then
bootloader="limine"
echo -e "${CYAN}Using Limine bootloader${NC}"
else
bootloader="systemd-boot"
echo -e "${CYAN}Using systemd-boot${NC}"
fi
read -rp "Enable Plymouth boot splash? [y/N]: " plymouth
plymouth="${plymouth:-n}"
[[ "$plymouth" =~ ^[Yy] ]] && enable_plymouth="true" || enable_plymouth="false"
echo ""
}
prompt_features() { prompt_features() {
echo -e "${BOLD}Optional Features${NC}" echo -e "${BOLD}Optional Features${NC}"
@@ -182,6 +204,10 @@ generate_config() {
enablePrinting = ${enable_printing}; enablePrinting = ${enable_printing};
enableBluetooth = true; enableBluetooth = true;
# Boot
bootloader = "${bootloader}";
enablePlymouth = ${enable_plymouth};
# Performance (security tradeoff) # Performance (security tradeoff)
enableMitigationsOff = ${enable_mitigations_off}; enableMitigationsOff = ${enable_mitigations_off};
@@ -253,6 +279,8 @@ show_summary() {
echo -e "Timezone: ${CYAN}${timezone}${NC}" echo -e "Timezone: ${CYAN}${timezone}${NC}"
echo -e "Locale: ${CYAN}${locale}${NC}" echo -e "Locale: ${CYAN}${locale}${NC}"
echo -e "Keyboard: ${CYAN}${keyboard}${NC}" echo -e "Keyboard: ${CYAN}${keyboard}${NC}"
echo -e "Bootloader: ${CYAN}${bootloader}${NC}"
echo -e "Plymouth: ${CYAN}${enable_plymouth}${NC}"
echo -e "Syncthing: ${CYAN}${enable_syncthing}${NC}" echo -e "Syncthing: ${CYAN}${enable_syncthing}${NC}"
echo -e "Mullvad: ${CYAN}${enable_mullvad}${NC}" echo -e "Mullvad: ${CYAN}${enable_mullvad}${NC}"
echo -e "Printing: ${CYAN}${enable_printing}${NC}" echo -e "Printing: ${CYAN}${enable_printing}${NC}"
@@ -303,6 +331,7 @@ main() {
prompt_locale prompt_locale
prompt_keyboard prompt_keyboard
prompt_location prompt_location
prompt_bootloader
prompt_features prompt_features
show_summary show_summary

View File

@@ -1,5 +1,5 @@
# Boot configuration # Boot configuration
# Supports both systemd-boot (default) and Limine # Supports systemd-boot (default) and Limine (optional)
{ {
config, config,
lib, lib,
@@ -7,19 +7,94 @@
nomarchyConfig, nomarchyConfig,
... ...
}: let }: let
# For ISO builds, we'll use Limine; for regular installs, systemd-boot bootloader = nomarchyConfig.bootloader or "systemd-boot";
useSystemdBoot = nomarchyConfig.bootloader or "systemd-boot" == "systemd-boot"; useLimine = bootloader == "limine";
useSystemdBoot = bootloader == "systemd-boot";
# Theme colors for Limine
theme = config.nomarchy.theme or (import ../../themes/classical/colors.nix);
in { in {
# Systemd-boot (default for NixOS installs) # Systemd-boot (default - simpler, well-tested)
boot.loader.systemd-boot = lib.mkIf useSystemdBoot { boot.loader.systemd-boot = lib.mkIf useSystemdBoot {
enable = true; enable = true;
configurationLimit = 10; 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) # Limine bootloader (optional - prettier, more features)
boot.loader.limine = lib.mkIf (!useSystemdBoot) { boot.loader.limine = lib.mkIf useLimine {
enable = true; 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
}; };
} }