How to pin grub2_efi to an older version

I would like to install grub2_efi from an older version of nixpkgs (b38e95ea6c15b9ce098556f410d715b262fa386a to be exact). Is it possible to do this, and still use all the boot.loader.grub options? I note that there is no boot.loader.grub.package option, from what I can tell.

Maybe something like this?

{ config, pkgs, ... }:
  disabledModules = [ "system/boot/loader/grub/grub.nix" ];
  imports = [
    <your replacement module>

source: Is it possible to have a config.system.{...} overlay? - #2 by mattchrist

1 Like

Hmmm… that might work. I would then need to duplicate that module, and link it to an older package (handily, there are grubPkgs and realGrub variables that could be assigned appropriately. Am I thinking right?

Yes, that’s what I gleaned from the post I linked. It’s not ideal but should work.

OK, thanks. That link is helpful, too, as it highlights boot.loader.grub.extraInstallCommands which will likely help us out as we try to get our 32-bit UEFI working with 64-bit NixOS. Sadly, it is currently broken.

1 Like