diff options
author | Milan Pässler <milan@petabyte.dev> | 2020-10-12 19:05:21 +0200 |
---|---|---|
committer | Milan Pässler <milan@petabyte.dev> | 2020-10-12 19:05:21 +0200 |
commit | bd04e09fc6006d1ff048c6abdaa3e6ecef30fb4b (patch) | |
tree | 1aba3ab94f349b3159adff4edb25ef5e8e63bfda /modules/tianocore/default.nix | |
parent | 949fa85bb8ad9c97c73e255a0f43247a41193e67 (diff) |
allow tianocore as secondary payload
Diffstat (limited to 'modules/tianocore/default.nix')
-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"; }; |