refactor: split systems into archetypes
refactor(module): move kernel config to module refactor(module): move nix config to module refactor(module): move networking config to module refactor(module): move nix config to module refactor(module): move grub config to module
This commit is contained in:
		
							parent
							
								
									067bc992b6
								
							
						
					
					
						commit
						b43660c227
					
				
					 9 changed files with 228 additions and 66 deletions
				
			
		
							
								
								
									
										37
									
								
								modules/nixos/common/bluetooth/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								modules/nixos/common/bluetooth/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,37 @@ | |||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   inputs, | ||||
| 
 | ||||
|   namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". | ||||
|   system, # The system architecture for this host (eg. `x86_64-linux`). | ||||
|   target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). | ||||
|   format, # A normalized name for the system target (eg. `iso`). | ||||
|   virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. | ||||
|   systems, # An attribute map of your defined hosts. | ||||
| 
 | ||||
|   config, | ||||
|   ... | ||||
| }: with lib; with lib.${namespace}; | ||||
| let | ||||
|   cfg = config.${namespace}.common.bluetooth; | ||||
| in { | ||||
|   options.${namespace}.common.bluetooth = { enable = mkEnableOption "Enable bluetooth support on your current system"; }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     hardware.bluetooth = { | ||||
|       enable = true; | ||||
|       powerOnBoot = true; | ||||
|       package = pkgs.bluez; | ||||
| 
 | ||||
|       settings = { | ||||
|         General = { | ||||
|           ControllerMode = "dual"; | ||||
|           FastConnectable = "true"; | ||||
|           Experimental = "true"; | ||||
|           KernelExperimental = "true"; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue