diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tianocore/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/tianocore/default.nix b/modules/tianocore/default.nix index 1ebf3d93d945..0ebe453909bb 100644 --- a/modules/tianocore/default.nix +++ b/modules/tianocore/default.nix @@ -4,14 +4,24 @@ with lib; let cfg = config.tianocore; + payloadName = if cfg.asSecondaryPayload then + "img/tianocore" + else + "fallback/payload"; + in { options.tianocore = { enable = mkEnableOption "tianocore coreboot primary payload"; + + asSecondaryPayload = mkOption { + type = types.bool; + default = false; + }; }; config = lib.mkIf cfg.enable { corenix.extraFiles = { - "fallback/payload" = { + ${payloadName} = { type = "payload"; src = "${pkgs.coreboot-payload-tianocore}/FV/UEFIPAYLOAD.fd"; }; |