You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
560 B
29 lines
560 B
4 years ago
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
cfg = config.tianocore;
|
||
4 years ago
|
payloadName =
|
||
|
if cfg.asSecondaryPayload then "img/tianocore" else "fallback/payload";
|
||
4 years ago
|
|
||
4 years ago
|
in {
|
||
|
options.tianocore = {
|
||
|
enable = mkEnableOption "tianocore coreboot primary payload";
|
||
4 years ago
|
|
||
|
asSecondaryPayload = mkOption {
|
||
|
type = types.bool;
|
||
|
default = false;
|
||
|
};
|
||
4 years ago
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
4 years ago
|
corenix.extraFiles = {
|
||
4 years ago
|
${payloadName} = {
|
||
4 years ago
|
type = "payload";
|
||
|
src = "${pkgs.coreboot-payload-tianocore}/FV/UEFIPAYLOAD.fd";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|