1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-23 19:39:42 +01:00
nixos-hardware/raspberry-pi/4/pkgs-overlays.nix

21 lines
607 B
Nix
Raw Normal View History

{ config, lib, pkgs, modulesPath, ... }:
let
cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge;
dt_ao_overlay = (final: prev: {
2022-08-08 18:46:26 +02:00
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 ];
};
}