mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
nixos/uki: allow deviceTree to be excluded from UKI
When setting `hardware.deviceTree.name` and `.enable`, a DeviceTree
section is added to UKI. This is nice default behavior for arm64
systems. When `hardware.deviceTree.package` plumbs into UEFI firmware
(e.g. u-boot), the UKI replaces the UEFI-supplied DTB. Besides bloating
the UKI, this has the side-effect of preventing UEFI firmware from
making modifications to the devicetree.
Filter out null boot.uki.settings values so that a NixOS configuration
can set `boot.uki.settings.UKI.DeviceTree = null;` to remove the default
behavior of packing the dtb into the UKI.
(cherry picked from commit e949e86001)
This commit is contained in:
committed by
github-actions[bot]
parent
18fb21044e
commit
f76797e02a
@@ -12,6 +12,8 @@ let
|
||||
inherit (pkgs.stdenv.hostPlatform) efiArch;
|
||||
|
||||
format = pkgs.formats.ini { };
|
||||
|
||||
ukiSettings = lib.filterAttrsRecursive (_: v: v != null) cfg.settings;
|
||||
in
|
||||
|
||||
{
|
||||
@@ -94,7 +96,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.uki.configFile = lib.mkOptionDefault (format.generate "ukify.conf" cfg.settings);
|
||||
boot.uki.configFile = lib.mkOptionDefault (format.generate "ukify.conf" ukiSettings);
|
||||
|
||||
system.boot.loader.ukiFile =
|
||||
let
|
||||
|
||||
Reference in New Issue
Block a user