File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 204204
205205 # grub does not handle device tree yet
206206 ( lib . mkIf ( config . boot . loader . grub . enable ) {
207- warnings = lib . optional ( ! config . boot . loader . grub . efiSupport ) "grub.efiSupport is required for Lenovo Thinkpad x13s" ;
207+ warnings = lib . optional (
208+ ! config . boot . loader . grub . efiSupport
209+ ) "grub.efiSupport is required for Lenovo Thinkpad x13s" ;
208210 boot = {
209211 loader . grub = {
210212 extraPerEntryConfig = ''
211213 devicetree dtbs/${ deviceTree . kernelPackage . version } /${ deviceTree . name }
212214 '' ;
213- extraFiles = let
214- deviceTrees = lib . map ( lib . removePrefix "${ deviceTree . package } /" ) ( lib . filesystem . listFilesRecursive "${ deviceTree . package } " ) ;
215- in lib . listToAttrs ( lib . map ( dt : {
216- name = builtins . unsafeDiscardStringContext "dtbs/${ deviceTree . kernelPackage . version } /${ dt } " ;
217- value = "${ deviceTree . package } /${ dt } " ;
218- } ) deviceTrees ) ;
215+ extraFiles =
216+ let
217+ deviceTrees = lib . map ( lib . removePrefix "${ deviceTree . package } /" ) (
218+ lib . filesystem . listFilesRecursive "${ deviceTree . package } "
219+ ) ;
220+ in
221+ lib . listToAttrs (
222+ lib . map ( dt : {
223+ # It's alright to throw away the context here. We still have context through the value
224+ # and the context is not needed to generate paths based on filenames in the device tree
225+ name = builtins . unsafeDiscardStringContext "dtbs/${ deviceTree . kernelPackage . version } /${ dt } " ;
226+ value = "${ deviceTree . package } /${ dt } " ;
227+ } ) deviceTrees
228+ ) ;
219229 } ;
220230 } ;
221231 } )
You can’t perform that action at this time.
0 commit comments