1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-27 20:19:45 +01:00
nixos-hardware/raspberry-pi/4/pkgs-overlays.nix

23 lines
623 B
Nix
Raw Normal View History

2022-12-31 11:52:38 +01:00
{ config, lib, ... }:
let
cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge;
2022-12-31 11:52:38 +01:00
dt_ao_overlay = _final: prev: {
deviceTree = prev.deviceTree // {
applyOverlays = _final.callPackage ./apply-overlays-dtmerge.nix { };
};
2022-12-31 11:52:38 +01:00
};
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 ];
};
}