forked from jan-leila/nix-config
		
	fix: fixed database timezone alter not working
This commit is contained in:
		
							parent
							
								
									e2e07c9a70
								
							
						
					
					
						commit
						1b1a3f7219
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -223,7 +223,7 @@ in { | ||||||
|       # TODO: start sg blur config |       # TODO: start sg blur config | ||||||
|     }) |     }) | ||||||
|     (lib.mkIf config.services.panoramax.database.createDB { |     (lib.mkIf config.services.panoramax.database.createDB { | ||||||
|       services.postgresql = lib.mkIf config.services.panoramax.database.enable { |       services.postgresql = { | ||||||
|         enable = true; |         enable = true; | ||||||
|         ensureDatabases = lib.mkIf config.services.panoramax.database.createDB [config.services.panoramax.database.name]; |         ensureDatabases = lib.mkIf config.services.panoramax.database.createDB [config.services.panoramax.database.name]; | ||||||
|         ensureUsers = lib.mkIf config.services.panoramax.database.createDB [ |         ensureUsers = lib.mkIf config.services.panoramax.database.createDB [ | ||||||
|  | @ -239,7 +239,8 @@ in { | ||||||
|         sqlFile = pkgs.writeText "panoramax-postgis-setup.sql" '' |         sqlFile = pkgs.writeText "panoramax-postgis-setup.sql" '' | ||||||
|           CREATE EXTENSION IF NOT EXISTS postgis; |           CREATE EXTENSION IF NOT EXISTS postgis; | ||||||
| 
 | 
 | ||||||
|           ALTER DATABASE ${config.services.panoramax.database.name} SET TIMEZONE TO 'UTC'; |           -- TODO: how can we ensure that this runs after the databases have been created | ||||||
|  |           -- ALTER DATABASE ${config.services.panoramax.database.name} SET TIMEZONE TO 'UTC'; | ||||||
| 
 | 
 | ||||||
|           GRANT SET ON PARAMETER session_replication_role TO ${config.services.panoramax.database.user}; |           GRANT SET ON PARAMETER session_replication_role TO ${config.services.panoramax.database.user}; | ||||||
|         ''; |         ''; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue