mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 09:17:14 +08:00 
			
		
		
		
	apple/t2: deprecate enableTinyDfr option and conflict with hardware.apple.touchBar
				
					
				
			* Adds a deprecation warning to hardware.apple-t2.enableTinyDfr as it has been upstreamed to nixpkgs already. The package and option can be removed at the next release cycle to hopefully not break people's setup. * Adds an assertion to conflict hardware.apple-t2.enableTinyDfr with hardware.apple.touchBar. Having both enabled causes both tiny-dfr to fight for the same display device.
This commit is contained in:
		
				
					committed by
					
						
						mergify[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							912e5b8a00
						
					
				
				
					commit
					e1cc1f6483
				
			@@ -109,6 +109,16 @@ in
 | 
			
		||||
      '';
 | 
			
		||||
    })
 | 
			
		||||
    (lib.mkIf t2Cfg.enableTinyDfr {
 | 
			
		||||
      warnings = [
 | 
			
		||||
        ''
 | 
			
		||||
          hardware.apple-t2.enableTinyDfr is deprecated since the module has been upstreamed as hardware.apple.touchBar. 
 | 
			
		||||
          This option will be removed from the apple/t2 profile when NixOS 24.11 is released.
 | 
			
		||||
        ''
 | 
			
		||||
      ];
 | 
			
		||||
      assertions = lib.optionals (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11") [{
 | 
			
		||||
        assertion = !config.hardware.apple.touchBar.enable;
 | 
			
		||||
        message = "hardware.apple-t2.enableTinyDfr conflicts with hardware.apple.touchBar.enable. Please disable one of them.";
 | 
			
		||||
      }];
 | 
			
		||||
      services.udev.packages = [ tiny-dfrPackage ];
 | 
			
		||||
 | 
			
		||||
      systemd.services.tiny-dfr = {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user