How to apply the Breeze-Grub theme?

Does anyone know how to apply the breeze-grub GRUB theme? There don’t seem to be any instructions in the theme repository, and none of the instructions I’ve turned up online look to apply to NixOS.


{ config, lib, modulesPath, options, pkgs }:

with lib;

     boot = {
       loader.grub.extraConfig = "set 

Don’t know if there’s a cleaner way.

Thanks! Worked nearly perfectly; the only issues I ran into were (1) GRUB took a lot longer to load up than I was expecting, and (2) the default NixOS background image flashes briefly after selecting an entry.

After a little bit of experimentation, it looks like prefixing the theme variable with the appropriate drive specifier eliminate the extra load time, and setting splashImage to null eliminated the background image flash, so I wound up with something like:

{ config, pkgs, ... }:

  boot.loader.grub = {
    extraConfig = "set theme=($drive2)${pkgs.breeze-grub}/grub/themes/breeze/theme.txt";
    splashImage = null;

It took more time than it should, that I remember I am using an encrypted root :man_facepalming:
Solution is probably copying all needed with boot.loader.grub.extraFiles option and use the theme directly in /boot, but since that option doesn’t support recursive copy, I’ll skip theming grub for now…

That makes sense, though FWIW it works with an encrypted /boot (with just an unencrypted EFI stub). But that makes sense, as from Grub’s perspective that situation is pretty close to having an unencrypted root.

(Also, encrypted /boot is slooooow.)

Since this comes up with Google for “NixOS Grub theme”, here’s a flake with a few other themes exposed: GitHub - vinceliuice/grub2-themes: Modern Design theme for Grub2

and might let you get around hard-coding the drive path

1 Like