s/urlFor/urlForBucket
This commit is contained in:
		
							parent
							
								
									51a294a659
								
							
						
					
					
						commit
						6b45256839
					
				
					 4 changed files with 7 additions and 7 deletions
				
			
		|  | @ -68,7 +68,7 @@ in { | |||
|                   type = types.int; | ||||
|                   default = 3902; | ||||
|                 }; | ||||
|                 urlFor = mkOption { | ||||
|                 urlForBucket = mkOption { | ||||
|                   type = types.functionTo types.str; | ||||
|                   default = bucket: "http://${bucket}.${config.fediversity.internal.garage.web.rootDomain}"; | ||||
|                 }; | ||||
|  |  | |||
|  | @ -74,17 +74,17 @@ lib.mkIf (config.fediversity.enable && config.fediversity.peertube.enable) { | |||
|         web_videos = rec { | ||||
|           bucket_name = "peertube-videos"; | ||||
|           prefix = ""; | ||||
|           base_url = config.fediversity.internal.garage.web.urlFor bucket_name; | ||||
|           base_url = config.fediversity.internal.garage.web.urlForBucket bucket_name; | ||||
|         }; | ||||
|         videos = rec { | ||||
|           bucket_name = "peertube-videos"; | ||||
|           prefix = ""; | ||||
|           base_url = config.fediversity.internal.garage.web.urlFor bucket_name; | ||||
|           base_url = config.fediversity.internal.garage.web.urlForBucket bucket_name; | ||||
|         }; | ||||
|         streaming_playlists = rec { | ||||
|           bucket_name = "peertube-playlists"; | ||||
|           prefix = ""; | ||||
|           base_url = config.fediversity.internal.garage.web.urlFor bucket_name; | ||||
|           base_url = config.fediversity.internal.garage.web.urlForBucket bucket_name; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|  |  | |||
|  | @ -52,7 +52,7 @@ lib.mkIf (config.fediversity.enable && config.fediversity.pixelfed.enable) { | |||
|     nginx = { | ||||
|       forceSSL = true; | ||||
|       enableACME = true; | ||||
|       # locations."/public/".proxyPass = "${config.fediversity.internal.garage.web.urlFor "pixelfed"}/public/"; | ||||
|       # locations."/public/".proxyPass = "${config.fediversity.internal.garage.web.urlForBucket "pixelfed"}/public/"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|  | @ -68,7 +68,7 @@ lib.mkIf (config.fediversity.enable && config.fediversity.pixelfed.enable) { | |||
|     AWS_ACCESS_KEY_ID = snakeoil_key.id; | ||||
|     AWS_SECRET_ACCESS_KEY = snakeoil_key.secret; | ||||
|     AWS_DEFAULT_REGION = "garage"; | ||||
|     AWS_URL = config.fediversity.internal.garage.web.urlFor "pixelfed"; | ||||
|     AWS_URL = config.fediversity.internal.garage.web.urlForBucket "pixelfed"; | ||||
|     AWS_BUCKET = "pixelfed"; | ||||
|     AWS_ENDPOINT = config.fediversity.internal.garage.api.url; | ||||
|     AWS_USE_PATH_STYLE_ENDPOINT = false; | ||||
|  |  | |||
|  | @ -202,7 +202,7 @@ pkgs.nixosTest { | |||
| 
 | ||||
|     with subtest("Check that image comes from garage"): | ||||
|       src = server.succeed("su - selenium -c 'selenium-script-get-src ${email} ${password}'") | ||||
|       if not src.startswith("${nodes.server.fediversity.internal.garage.web.urlFor "pixelfed"}"): | ||||
|       if not src.startswith("${nodes.server.fediversity.internal.garage.web.urlForBucket "pixelfed"}"): | ||||
|         raise Exception("image does not come from garage") | ||||
|   ''; | ||||
| } | ||||
|  |  | |||
		Reference in a new issue