mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 09:17:14 +08:00 
			
		
		
		
	* fix compileDTS overlay due to https://github.com/NixOS/nixpkgs/pull/251898 the compileDTS function has been moved to `device-tree` nixos-hardware has an own overlay for the raspberry-pi which needs the `compileDTS` function now, too. This commit adds it. Signed-off-by: Florian Brandes <florian.brandes@posteo.de> * apply review comments Co-authored-by: Majiir Paktu <majiir@nabaal.net> Signed-off-by: Florian Brandes <florian.brandes@posteo.de> --------- Signed-off-by: Florian Brandes <florian.brandes@posteo.de> Co-authored-by: Majiir Paktu <majiir@nabaal.net>
		
			
				
	
	
		
			23 lines
		
	
	
		
			623 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			623 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 ''
 | 
						|
        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 ];
 | 
						|
  };
 | 
						|
}
 |