mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-16 07:59:41 +01:00
20 lines
585 B
Nix
20 lines
585 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge;
|
|
dt_ao_overlay = _final: prev: {
|
|
deviceTree.applyOverlays = prev.callPackage ./apply-overlays-dtmerge.nix { };
|
|
};
|
|
in {
|
|
options.hardware = {
|
|
raspberry-pi."4".apply-overlays-dtmerge = {
|
|
enable = lib.mkEnableOption ''
|
|
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 ];
|
|
};
|
|
}
|