forked from jan-leila/nix-config
		
	
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			552 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			552 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   lib,
 | |
|   config,
 | |
|   ...
 | |
| }: {
 | |
|   config = lib.mkIf config.services.panoramax.enable (lib.mkMerge [
 | |
|     {
 | |
|       host = {
 | |
|         postgres = {
 | |
|           enable = true;
 | |
|         };
 | |
|       };
 | |
|     }
 | |
|     (lib.mkIf config.host.postgres.enable {
 | |
|       host = {
 | |
|         postgres = {
 | |
|           extraUsers = {
 | |
|             ${config.services.panoramax.database.user} = {
 | |
|               isClient = true;
 | |
|             };
 | |
|           };
 | |
|           extraDatabases = {
 | |
|             ${config.services.panoramax.database.name} = {};
 | |
|           };
 | |
|         };
 | |
|       };
 | |
|     })
 | |
|   ]);
 | |
| }
 |