forked from fabian/nix
		
	modularize android support
This commit is contained in:
		
							parent
							
								
									ff1b655d3c
								
							
						
					
					
						commit
						33ab479e22
					
				
					 3 changed files with 20 additions and 4 deletions
				
			
		
							
								
								
									
										18
									
								
								sys/modules/android.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								sys/modules/android.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| with lib; let | ||||
|   cfg = config.local.sys.androidSupport; | ||||
| in { | ||||
|   options.local.sys.androidSupport = { | ||||
|     enable = mkEnableOption "androidSupport settings"; | ||||
|   }; | ||||
|   config = mkIf cfg.enable { | ||||
|     services.udev.packages = with pkgs; [ | ||||
|       android-udev-rules | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
|  | @ -10,5 +10,6 @@ | |||
|     ./audio.nix | ||||
|     ./graphics.nix | ||||
|     ./virtualisation.nix | ||||
|     ./android.nix | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
|  | @ -19,6 +19,7 @@ | |||
|     audio.enable = true; | ||||
|     graphics.enable = true; | ||||
|     virtualisation.enable = true; | ||||
|     androidSupport.enable = true; | ||||
|   }; | ||||
| 
 | ||||
|   # Use the systemd-boot EFI boot loader. | ||||
|  | @ -53,8 +54,4 @@ | |||
|     }; | ||||
|     groups.fabian.gid = 1002; | ||||
|   }; | ||||
| 
 | ||||
|   services.udev.packages = [ | ||||
|     pkgs.android-udev-rules | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue