added ollama to defiant
This commit is contained in:
		
							parent
							
								
									5cc41542e1
								
							
						
					
					
						commit
						7b6344b419
					
				
					 3 changed files with 32 additions and 2 deletions
				
			
		|  | @ -1,4 +1,6 @@ | ||||||
| [ | [ | ||||||
|   "leyla" |   "leyla" | ||||||
|   "webdav" |   "webdav" | ||||||
|  |   "ollama" | ||||||
|  |   "optimise" | ||||||
| ] | ] | ||||||
|  |  | ||||||
|  | @ -201,13 +201,28 @@ | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     ollama = { |     ollama = { | ||||||
|       enable = false; |       enable = true; | ||||||
|  |       exposePort = true; | ||||||
| 
 | 
 | ||||||
|       loadModels = [ |       loadModels = [ | ||||||
|         "deepseek-coder:6.7b" |         # conversation models | ||||||
|  |         "llama3.1:8b" | ||||||
|         "deepseek-r1:8b" |         "deepseek-r1:8b" | ||||||
|         "deepseek-r1:32b" |         "deepseek-r1:32b" | ||||||
|         "deepseek-r1:70b" |         "deepseek-r1:70b" | ||||||
|  | 
 | ||||||
|  |         # auto complete models | ||||||
|  |         "qwen2.5-coder:1.5b-base" | ||||||
|  |         "qwen2.5-coder:7b" | ||||||
|  |         "deepseek-coder:6.7b" | ||||||
|  |         "deepseek-coder:33b" | ||||||
|  | 
 | ||||||
|  |         # agent models | ||||||
|  |         "qwen3:8b" | ||||||
|  |         "qwen3:32b" | ||||||
|  | 
 | ||||||
|  |         # embedding models | ||||||
|  |         "nomic-embed-text:latest" | ||||||
|       ]; |       ]; | ||||||
|     }; |     }; | ||||||
|     tailscale = { |     tailscale = { | ||||||
|  |  | ||||||
|  | @ -3,6 +3,10 @@ | ||||||
|   lib, |   lib, | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|  |   options = { | ||||||
|  |     services.ollama.exposePort = lib.mkEnableOption "should we expose ollama on tailscale"; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|   config = lib.mkMerge [ |   config = lib.mkMerge [ | ||||||
|     { |     { | ||||||
|       services.ollama = { |       services.ollama = { | ||||||
|  | @ -22,6 +26,15 @@ | ||||||
|           } |           } | ||||||
|         ]; |         ]; | ||||||
|       }; |       }; | ||||||
|  |       networking.firewall.interfaces.${config.services.tailscale.interfaceName} = let | ||||||
|  |         ports = [ | ||||||
|  |           config.services.ollama.port | ||||||
|  |         ]; | ||||||
|  |       in | ||||||
|  |         lib.mkIf config.services.ollama.exposePort { | ||||||
|  |           allowedTCPPorts = ports; | ||||||
|  |           allowedUDPPorts = ports; | ||||||
|  |         }; | ||||||
|     })) |     })) | ||||||
|   ]; |   ]; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue