aboutsummaryrefslogtreecommitdiff
path: root/modules/grub2/default.nix
blob: c8790b880081755359e68e01d47713e32ae4e0b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, pkgs, ... }:

with lib;

let
  cfg = config.grub2;
in {
  options.grub2 = {
    enable = mkEnableOption "grub2 coreboot primary payload";
  };

  config = lib.mkIf cfg.enable {
    coreboot.rom.extraFiles = {
      "fallback/payload" = {
        type = "payload";
        src = "${pkgs.coreboot-payload-grub}/default_payload.elf";
      };
    };
  };
}