mirror of
				https://github.com/Jokiller230/puzzlevision.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	feat(module): add common hardware/peripherals module
refactor(module): move audio configuration to module
This commit is contained in:
		
							parent
							
								
									77c95c1140
								
							
						
					
					
						commit
						078657f1e2
					
				
					 7 changed files with 52 additions and 68 deletions
				
			
		
							
								
								
									
										18
									
								
								modules/nixos/common/hardware/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/nixos/common/hardware/default.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
{
 | 
			
		||||
  lib,
 | 
			
		||||
  inputs,
 | 
			
		||||
  namespace,
 | 
			
		||||
  config,
 | 
			
		||||
  ...
 | 
			
		||||
}: with lib; with lib.${namespace};
 | 
			
		||||
let
 | 
			
		||||
  cfg = config.${namespace}.common.hardware;
 | 
			
		||||
in {
 | 
			
		||||
  options.${namespace}.common.hardware = { enable = mkEnableOption "whether to enable common hardware support"; };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    hardware.sensor.iio.enable = true; # Enable iio-sensor for automatic screen rotation and similar features.
 | 
			
		||||
 | 
			
		||||
    hardware.flipperzero.enable = true; # Enable support for the flipperzero device.
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue