nixos-hardware/raspberry-pi/4/pkgs-overlays.nix
Karolis Stasaitis 245d8f9f97
apply review suggestions from @06kellyjac
Co-authored-by: j-k <dev@j-k.io>
2022-08-08 18:27:49 +02:00

21 lines
606 B
Nix

{ config, lib, pkgs, modulesPath, ... }:
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 ];
};
}