add extra-config

This commit is contained in:
Travis Staton 2023-02-21 20:21:55 -05:00
parent 3263812697
commit 4d7687ec92

View file

@ -2,6 +2,12 @@
{
imports = [ ./sd-image.nix ];
options.hardware.raspberry-pi = {
extra-config = lib.mkOption {
type = lib.types.str;
default = "";
};
};
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
@ -47,7 +53,7 @@
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
# when attempting to show low-voltage or overtemperature warnings.
avoid_warnings=1
'';
'' ++ config.hardware.raspberry-pi.extra-config;
in ''
(cd ${raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)