forked from jan-leila/nix-config
		
	feat: started to create panoramax config
This commit is contained in:
		
							parent
							
								
									22b9c5b3f9
								
							
						
					
					
						commit
						88dcba346f
					
				
					 3 changed files with 111 additions and 0 deletions
				
			
		
							
								
								
									
										43
									
								
								modules/nixos-modules/server/panoramax.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								modules/nixos-modules/server/panoramax.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   osConfig, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.services.panoramax; | ||||
| in { | ||||
|   options.services.panoramax = { | ||||
|     enable = lib.mkEnableOption "panoramax"; | ||||
| 
 | ||||
|     package = lib.mkOption { | ||||
|       type = lib.types.package; | ||||
|       default = pkgs.panoramax; | ||||
|       description = "The panoramax package to use"; | ||||
|     }; | ||||
| 
 | ||||
|     # TODO: create configs | ||||
|     # TODO: auto config db | ||||
|     # config = { | ||||
|     #   DB_PORT = lib.mkOption {}; | ||||
|     #   DB_HOST = lib.mkOption {}; | ||||
|     #   DB_USERNAME = lib.mkOption {}; | ||||
|     #   DB_PASSWORD = lib.mkOption {}; | ||||
|     #   DB_NAME = lib.mkOption {}; | ||||
|     #   FS_URL = lib.mkOption {}; | ||||
|     # }; | ||||
|   }; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable ( | ||||
|     lib.mkMerge [ | ||||
|       { | ||||
|         # TODO: configure options for the package | ||||
|       } | ||||
|       ( | ||||
|         lib.mkIf osConfig.host.impermanence.enable { | ||||
|           # TODO: configure impermanence for panoramax data | ||||
|         } | ||||
|       ) | ||||
|     ] | ||||
|   ); | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue