forked from fabian/nix
		
	modularize bluetooth
This commit is contained in:
		
							parent
							
								
									8fed4a320d
								
							
						
					
					
						commit
						b64c85e314
					
				
					 2 changed files with 30 additions and 0 deletions
				
			
		
							
								
								
									
										29
									
								
								sys/modules/bluetooth.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								sys/modules/bluetooth.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | ||||||
|  | { | ||||||
|  |   config, | ||||||
|  |   lib, | ||||||
|  |   pkgs, | ||||||
|  |   ... | ||||||
|  | }: | ||||||
|  | with lib; let | ||||||
|  |   cfg = config.local.sys.bluetooth; | ||||||
|  | in { | ||||||
|  |   options.local.sys.bluetooth = { | ||||||
|  |     enable = mkEnableOption "bluetooth settings"; | ||||||
|  |   }; | ||||||
|  |   config = mkIf cfg.enable { | ||||||
|  |     hardware = { | ||||||
|  |       bluetooth = { | ||||||
|  |         enable = true; | ||||||
|  |         settings = { | ||||||
|  |           General = { | ||||||
|  |             Enable = "Source,Sink,Media,Socket"; | ||||||
|  |           }; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     services = { | ||||||
|  |       blueman.enable = true; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | } | ||||||
|  | @ -12,5 +12,6 @@ | ||||||
|     ./virtualisation.nix |     ./virtualisation.nix | ||||||
|     ./android.nix |     ./android.nix | ||||||
|     ./users.nix |     ./users.nix | ||||||
|  |     ./bluetooth.nix | ||||||
|   ]; |   ]; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue