forked from jan-leila/nix-config
		
	fix: disabled broken panoramax config
This commit is contained in:
		
							parent
							
								
									333c68a8cd
								
							
						
					
					
						commit
						2cdc39f3dc
					
				
					 3 changed files with 29 additions and 18 deletions
				
			
		|  | @ -307,7 +307,7 @@ | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     panoramax = { |     panoramax = { | ||||||
|       enable = true; |       enable = false; | ||||||
|       openFirewall = true; |       openFirewall = true; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -11,19 +11,24 @@ | ||||||
|         }; |         }; | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|     (lib.mkIf config.host.postgres.enable { |     ( | ||||||
|  |       lib.mkIf config.host.postgres.enable { | ||||||
|         host = { |         host = { | ||||||
|           postgres = { |           postgres = { | ||||||
|             extraUsers = { |             extraUsers = { | ||||||
|               ${config.services.panoramax.database.user} = { |               ${config.services.panoramax.database.user} = { | ||||||
|                 isClient = true; |                 isClient = true; | ||||||
|  |                 createUser = true; | ||||||
|               }; |               }; | ||||||
|             }; |             }; | ||||||
|             extraDatabases = { |             extraDatabases = { | ||||||
|             ${config.services.panoramax.database.name} = {}; |               ${config.services.panoramax.database.name} = { | ||||||
|  |                 name = config.services.panoramax.database.user; | ||||||
|               }; |               }; | ||||||
|             }; |             }; | ||||||
|           }; |           }; | ||||||
|     }) |         }; | ||||||
|  |       } | ||||||
|  |     ) | ||||||
|   ]); |   ]); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -206,12 +206,6 @@ | ||||||
|             # Core Flask configuration |             # Core Flask configuration | ||||||
|             FLASK_APP = "geovisio"; |             FLASK_APP = "geovisio"; | ||||||
| 
 | 
 | ||||||
|             # Database configuration |  | ||||||
|             DB_HOST = config.services.panoramax.database.host; |  | ||||||
|             DB_PORT = toString config.services.panoramax.database.port; |  | ||||||
|             DB_USERNAME = config.services.panoramax.database.user; |  | ||||||
|             DB_NAME = config.services.panoramax.database.name; |  | ||||||
| 
 |  | ||||||
|             # Storage configuration |             # Storage configuration | ||||||
|             FS_URL = config.services.panoramax.settings.storage.fsUrl; |             FS_URL = config.services.panoramax.settings.storage.fsUrl; | ||||||
| 
 | 
 | ||||||
|  | @ -224,6 +218,18 @@ | ||||||
|             # Python path to include the panoramax package |             # Python path to include the panoramax package | ||||||
|             PYTHONPATH = "${config.services.panoramax.package}/${pkgs.python3.sitePackages}"; |             PYTHONPATH = "${config.services.panoramax.package}/${pkgs.python3.sitePackages}"; | ||||||
|           } |           } | ||||||
|  |           // ( | ||||||
|  |             if config.services.panoramax.database.host == "/run/postgresql" | ||||||
|  |             then { | ||||||
|  |               DB_URL = "postgresql://${config.services.panoramax.database.user}@/${config.services.panoramax.database.name}?host=/run/postgresql"; | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |               DB_HOST = config.services.panoramax.database.host; | ||||||
|  |               DB_PORT = toString config.services.panoramax.database.port; | ||||||
|  |               DB_USERNAME = config.services.panoramax.database.user; | ||||||
|  |               DB_NAME = config.services.panoramax.database.name; | ||||||
|  |             } | ||||||
|  |           ) | ||||||
|           // (lib.optionalAttrs (config.services.panoramax.settings.flask.secretKey != null) { |           // (lib.optionalAttrs (config.services.panoramax.settings.flask.secretKey != null) { | ||||||
|             FLASK_SECRET_KEY = config.services.panoramax.settings.flask.secretKey; |             FLASK_SECRET_KEY = config.services.panoramax.settings.flask.secretKey; | ||||||
|           }) |           }) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue