mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-12-10 11:01:04 +01:00
chore: undo dtparams, improve kernel building code
This commit is contained in:
parent
aa99f3a2dd
commit
57a532319e
5 changed files with 93 additions and 73 deletions
|
|
@ -16,7 +16,8 @@ let
|
|||
(lib.filterAttrs (k: v: v.enable) x);
|
||||
render-dt-overlay = { overlay, args }:
|
||||
"dtoverlay=" + overlay + "\n"
|
||||
+ lib.strings.concatMapStringsSep "\n" render-dt-param args + "\n";
|
||||
+ lib.strings.concatMapStringsSep "\n" render-dt-param args + "\n"
|
||||
+ "dtoverlay=";
|
||||
render-base-dt-params = params:
|
||||
lib.strings.concatMapStringsSep "\n" render-dt-param
|
||||
(render-dt-kvs params);
|
||||
|
|
|
|||
|
|
@ -4,13 +4,21 @@
|
|||
let
|
||||
cfg = config.raspberry-pi-nix;
|
||||
board = cfg.board;
|
||||
kernel = pkgs.rpi-kernels."latest_${board}".kernel;
|
||||
version = cfg.kernel_version;
|
||||
kernel = pkgs.rpi-kernels."${version}"."${board}";
|
||||
in
|
||||
{
|
||||
imports = [ ../sd-image ./config.nix ./i2c.nix ];
|
||||
|
||||
options = with lib; {
|
||||
raspberry-pi-nix = {
|
||||
kernel_version = mkOption {
|
||||
default = "v6_6_31";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Kernel version to build.
|
||||
'';
|
||||
};
|
||||
board = mkOption {
|
||||
default = "bcm2712";
|
||||
type = types.str;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue