diff options
Diffstat (limited to 'modules/coreinfo')
-rw-r--r-- | modules/coreinfo/default.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/coreinfo/default.nix b/modules/coreinfo/default.nix new file mode 100644 index 000000000000..7689ba42a15f --- /dev/null +++ b/modules/coreinfo/default.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.coreinfo; +in { + options.coreinfo = { + enable = mkEnableOption "coreinfo coreboot secondary payload"; + coreinfoConfig = mkOption { + type = types.attrsOf (types.nullOr types.str); + }; + }; + + config = lib.mkIf cfg.enable { + corenix.extraFiles = { + "img/coreinfo" = { + type = "payload"; + src = "${pkgs.coreboot-payload-coreinfo.override { + inherit (cfg) coreinfoConfig; + }}/coreinfo.elf"; + }; + }; + }; +} |