diff options
author | Mx Kookie <kookie@spacekookie.de> | 2021-01-01 00:55:51 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2021-01-01 00:55:51 +0100 |
commit | af8b681b5ef80871e6586061568b8ab8af2d85e3 (patch) | |
tree | 4f3d66f0afbea6c947cc4dff32fa4c25e70329d4 /infra/corenix/modules/tianocore/default.nix | |
parent | 51970440a767f3906bcb69cc3d00185391c5d595 (diff) | |
parent | 53a9f091f8cf9362a95c12130daa1f69ddff036c (diff) |
Add 'infra/corenix/' from commit '53a9f091f8cf9362a95c12130daa1f69ddff036c'
git-subtree-dir: infra/corenix
git-subtree-mainline: 51970440a767f3906bcb69cc3d00185391c5d595
git-subtree-split: 53a9f091f8cf9362a95c12130daa1f69ddff036c
Diffstat (limited to 'infra/corenix/modules/tianocore/default.nix')
-rw-r--r-- | infra/corenix/modules/tianocore/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/infra/corenix/modules/tianocore/default.nix b/infra/corenix/modules/tianocore/default.nix new file mode 100644 index 000000000000..59266c1aa058 --- /dev/null +++ b/infra/corenix/modules/tianocore/default.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +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 = { + ${payloadName} = { + type = "payload"; + src = "${pkgs.coreboot-payload-tianocore}/FV/UEFIPAYLOAD.fd"; + }; + }; + }; +} |