diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/coreboot/default.nix | 15 | ||||
-rw-r--r-- | modules/grub2/default.nix | 4 |
2 files changed, 14 insertions, 5 deletions
diff --git a/modules/coreboot/default.nix b/modules/coreboot/default.nix index aeeb4426f6d4..45706be546ea 100644 --- a/modules/coreboot/default.nix +++ b/modules/coreboot/default.nix @@ -4,13 +4,22 @@ with lib; let cfg = config.coreboot; + + fileOptions.options = { + src = mkOption { + type = types.path; + }; + type = mkOption { + type = types.str; + }; + }; in { options.coreboot = { extraFiles = mkOption { - type = types.attrs; + type = types.attrsOf (types.submodule fileOptions); }; corebootConfig = mkOption { - type = types.attrs; + type = types.attrsOf (types.nullOr types.str); }; rom = mkOption { readOnly = true; @@ -34,7 +43,7 @@ in { -t ${file.type} '') filesList; - in runCommand "coreboot-rom" { + in pkgs.runCommand "coreboot-rom" { buildInputs = with pkgs; [ cbfstool ]; } '' install -D ${base}/coreboot.rom -t $out diff --git a/modules/grub2/default.nix b/modules/grub2/default.nix index 8d0c60f3e50e..84aae528f828 100644 --- a/modules/grub2/default.nix +++ b/modules/grub2/default.nix @@ -10,10 +10,10 @@ in { }; config = lib.mkIf cfg.enable { - coreboot.rom.extraFiles = { + coreboot.extraFiles = { "fallback/payload" = { type = "payload"; - src = "${pkgs.coreboot-payload-grub}/default_payload.elf"; + src = "${pkgs.coreboot-payload-grub2}/default_payload.elf"; }; }; }; |