mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 16:57:14 +08:00
26 lines
676 B
Nix
26 lines
676 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge;
|
|
dt_ao_overlay = _final: prev: {
|
|
deviceTree = prev.deviceTree // {
|
|
applyOverlays = _final.callPackage ./apply-overlays-dtmerge.nix { };
|
|
};
|
|
};
|
|
in
|
|
{
|
|
options.hardware = {
|
|
raspberry-pi."4".apply-overlays-dtmerge = {
|
|
enable = lib.mkEnableOption "" // {
|
|
description = ''
|
|
Whether replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi.
|
|
This can resolve issues with applying dtbs for the pi.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
nixpkgs.overlays = [ dt_ao_overlay ];
|
|
};
|
|
}
|