| 
									
										
										
										
											2022-07-30 15:01:21 +02:00
										 |  |  | # Get RSS feeds from websites that don't natively have one | 
					
						
							|  |  |  | { config, lib, ... }: | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  |   cfg = config.my.services.rss-bridge; | 
					
						
							| 
									
										
										
										
											2022-11-09 22:14:20 +01:00
										 |  |  |   domain = "rss-bridge.${config.networking.domain}"; | 
					
						
							| 
									
										
										
										
											2022-07-30 15:01:21 +02:00
										 |  |  | in | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   options.my.services.rss-bridge = { | 
					
						
							|  |  |  |     enable = lib.mkEnableOption "RSS-Bridge service"; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   config = lib.mkIf cfg.enable { | 
					
						
							|  |  |  |     services.rss-bridge = { | 
					
						
							|  |  |  |       enable = true; | 
					
						
							|  |  |  |       whitelist = [ "*" ]; # Whitelist all | 
					
						
							|  |  |  |       virtualHost = domain; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     services.nginx.virtualHosts.${domain} = { | 
					
						
							|  |  |  |       forceSSL = true; | 
					
						
							|  |  |  |       enableACME = true; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     webapps.apps.rss-bridge = { | 
					
						
							|  |  |  |       dashboard = { | 
					
						
							|  |  |  |         name = "RSS-Bridge"; | 
					
						
							| 
									
										
										
										
											2022-12-25 12:20:20 +01:00
										 |  |  |         category = "infra"; | 
					
						
							| 
									
										
										
										
											2022-07-30 15:01:21 +02:00
										 |  |  |         icon = "rss"; | 
					
						
							|  |  |  |         link = "https://${domain}"; | 
					
						
							|  |  |  |       }; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |