aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMilan Pässler <milan@petabyte.dev>2020-10-10 17:18:04 +0200
committerMilan Pässler <milan@petabyte.dev>2020-10-10 17:18:04 +0200
commitbf204327ed2435251e99520a42854c42b03434ea (patch)
tree49d2106fb615e1e8efff3e845bdfa49018f55648 /modules
parentde086adc8372b3285c843e1419d20a3dccf2a78c (diff)
.
Diffstat (limited to 'modules')
-rw-r--r--modules/coreboot/default.nix15
-rw-r--r--modules/grub2/default.nix4
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";
};
};
};