[virtualbox] Move into proper module
This commit is contained in:
		
							parent
							
								
									b6044e99dc
								
							
						
					
					
						commit
						c46a7ce9c3
					
				
					 7 changed files with 29 additions and 20 deletions
				
			
		|  | @ -4,5 +4,6 @@ | |||
|   imports = [ | ||||
|     ./programs | ||||
|     ./users | ||||
|     ./virtualisation | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
|  | @ -30,7 +30,6 @@ in { | |||
|         # If you specify an application here, it will be detected by the configuration module | ||||
|         #  and the configuration files will be put in place for you. | ||||
|         packages = with pkgs; [ | ||||
|           brave | ||||
|           duf | ||||
|           jellyfin-media-player | ||||
|           libreoffice-fresh | ||||
|  |  | |||
							
								
								
									
										5
									
								
								nixos/modules/virtualisation/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								nixos/modules/virtualisation/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./virtualbox | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										23
									
								
								nixos/modules/virtualisation/virtualbox/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								nixos/modules/virtualisation/virtualbox/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.sisyphus.virtualisation.virtualbox; | ||||
| in { | ||||
|   options.sisyphus.virtualisation.virtualbox.enable = lib.mkEnableOption "VirtualBox"; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     virtualisation.virtualbox = { | ||||
|       host = { | ||||
|         enable = true; | ||||
|         enableExtensionPack = true; | ||||
|       }; | ||||
|       guest = { | ||||
|         enable = true; | ||||
|         x11 = true; | ||||
|       }; | ||||
|     }; | ||||
|     users.extraGroups.vboxusers.members = [ | ||||
|       "user-with-access-to-virtualbox" | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue