{ config, pkgs, lib, flakeRoot, ... }: let # Path to store GRUB theme grubThemeDir = "/boot/grub/themes/catppuccin-mocha"; # Catppuccin Mocha colors catppuccin = { base = "#1e1e2e"; # background mantle = "#181825"; crust = "#11111b"; text = "#cdd6f4"; rosewater = "#f5e0dc"; flamingo = "#f2cdcd"; pink = "#f5c2e7"; mauve = "#cba6f7"; red = "#f38ba8"; maroon = "#eba0ac"; peach = "#fab387"; yellow = "#f9e2af"; green = "#a6e3a1"; teal = "#94e2d5"; sky = "#89dceb"; sapphire = "#74c7ec"; blue = "#89b4fa"; lavender = "#b4befe"; }; # Helper to recursively write theme files grubThemeFile = "${grubThemeDir}/theme.txt"; in { boot = { initrd = { verbose = false; kernelModules = []; }; extraModulePackages = []; kernelPackages = pkgs.linuxPackages_latest; kernelParams = [ "quiet" ]; consoleLogLevel = 0; plymouth.enable = true; plymouth.theme = "spinner"; # default theme; we can override with custom image supportedFilesystems = [ "ntfs" ]; loader = { systemd-boot.enable = true; systemd-boot.configurationLimit = 10; efi.canTouchEfiVariables = true; timeout = 5; }; }; # GRUB theme setup using activation script system.activationScripts.grubTheme = { text = '' mkdir -p ${grubThemeDir} # Write GRUB theme using Catppuccin colors cat > ${grubThemeFile} <