add multi-dtb support, so we can actually test multiple kernels

This commit is contained in:
Adam Stephens 2024-03-07 11:19:25 -05:00
parent 4d55c26648
commit bebc446709
No known key found for this signature in database

View file

@ -25,6 +25,7 @@ let
throw "Unsupported kernel" throw "Unsupported kernel"
); );
dtb = "${linuxPackages_x13s.kernel}/dtbs/qcom/${dtbName}"; dtb = "${linuxPackages_x13s.kernel}/dtbs/qcom/${dtbName}";
dtbEfiPath = "dtbs/${cfg.kernel}/${config.boot.kernelPackages.kernel.version}/${dtbName}";
in in
{ {
options.nixos-x13s = { options.nixos-x13s = {
@ -66,14 +67,14 @@ in
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.enable = lib.mkDefault true; loader.systemd-boot.enable = lib.mkDefault true;
loader.systemd-boot.extraFiles = { loader.systemd-boot.extraFiles = {
"${dtbName}" = dtb; "${dtbEfiPath}" = dtb;
}; };
kernelPackages = linuxPackages_x13s; kernelPackages = linuxPackages_x13s;
kernelParams = [ kernelParams = [
# needed to boot # needed to boot
"dtb=${dtbName}" "dtb=${dtbEfiPath}"
# jhovold recommended # jhovold recommended
"efi=noruntime" "efi=noruntime"
@ -115,7 +116,9 @@ in
nixpkgs.overlays = [ nixpkgs.overlays = [
(_: super: { (_: super: {
# don't try and use zfs # don't try and use zfs
zfs = super.zfs.overrideAttrs (_: { meta.platforms = [ ]; }); zfs = super.zfs.overrideAttrs (_: {
meta.platforms = [ ];
});
# allow missing modules # allow missing modules
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; }); makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });