forked from fabian/nix
		
	vps: add wiki-js
This commit is contained in:
		
							parent
							
								
									cbda46edd5
								
							
						
					
					
						commit
						ae37ebf22a
					
				
					 2 changed files with 54 additions and 0 deletions
				
			
		|  | @ -18,5 +18,6 @@ with lib; { | ||||||
|     ./shiori.nix |     ./shiori.nix | ||||||
|     ./calibre-web.nix |     ./calibre-web.nix | ||||||
|     ./immich.nix |     ./immich.nix | ||||||
|  |     ./wiki-js.nix | ||||||
|   ]; |   ]; | ||||||
| } | } | ||||||
|  |  | ||||||
							
								
								
									
										53
									
								
								sys/platforms/vps/srv/wiki-js.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								sys/platforms/vps/srv/wiki-js.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,53 @@ | ||||||
|  | { | ||||||
|  |   lib, | ||||||
|  |   pkgs, | ||||||
|  |   ... | ||||||
|  | }: | ||||||
|  | with lib; { | ||||||
|  |   systemd.services.wiki-js = { | ||||||
|  |     requires = ["postgresql.service"]; | ||||||
|  |     after = ["postgresql.service"]; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   services = { | ||||||
|  |     nginx = { | ||||||
|  |       virtualHosts."wjs.posixlycorrect.com" = { | ||||||
|  |         enableACME = true; | ||||||
|  |         forceSSL = true; | ||||||
|  |         extraConfig = '' | ||||||
|  |           proxy_headers_hash_max_size 512; | ||||||
|  |           proxy_headers_hash_bucket_size 128; | ||||||
|  |         ''; | ||||||
|  |         locations."/" = { | ||||||
|  |           proxyPass = "http://127.0.0.1:3000"; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     wiki-js = { | ||||||
|  |       enable = true; | ||||||
|  |       environmentFile = "/var/trust/wiki-js/env.txt"; | ||||||
|  |       settings = { | ||||||
|  |         bindIP = "127.0.0.1"; | ||||||
|  |         port = 3000; | ||||||
|  |         db = { | ||||||
|  |           db = "wiki-js"; | ||||||
|  |           user = "wiki-js"; | ||||||
|  |           type = "postgres"; | ||||||
|  |           host = "/run/postgresql"; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     postgresql = { | ||||||
|  |       enable = true; | ||||||
|  |       ensureDatabases = ["wiki-js"]; | ||||||
|  |       ensureUsers = [ | ||||||
|  |         { | ||||||
|  |           name = "wiki-js"; | ||||||
|  |           ensureDBOwnership = true; | ||||||
|  |         } | ||||||
|  |       ]; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue