mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
use nix based config.txt generation
This commit is contained in:
parent
fdbe51e3b0
commit
67f257e524
3 changed files with 26 additions and 75 deletions
|
|
@ -22,11 +22,16 @@ let
|
|||
args = render-dt-kvs v;
|
||||
}) overlays);
|
||||
render-config-section = k:
|
||||
{ options, base-dtb-params, dt-overlays }: ''
|
||||
{ options, base-dtb-params, dt-overlays }:
|
||||
let
|
||||
all-config = lib.concatStringsSep "\n" (lib.filter (x: x != "") [
|
||||
(render-options options)
|
||||
(render-base-dt-params base-dtb-params)
|
||||
(render-dt-overlays dt-overlays)
|
||||
]);
|
||||
in ''
|
||||
[${k}]
|
||||
${render-options options}
|
||||
${render-base-dt-params base-dtb-params}
|
||||
${render-dt-overlays dt-overlays}
|
||||
${all-config}
|
||||
'';
|
||||
in conf:
|
||||
lib.strings.concatStringsSep "\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue