22 lines
		
	
	
	
		
			544 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			544 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  config,
 | 
						|
  lib,
 | 
						|
  ...
 | 
						|
}: {
 | 
						|
  options.services.searx = {
 | 
						|
    subdomain = lib.mkOption {
 | 
						|
      type = lib.types.str;
 | 
						|
      description = "subdomain of base domain that searx will be hosted at";
 | 
						|
      default = "searx";
 | 
						|
    };
 | 
						|
  };
 | 
						|
 | 
						|
  config = lib.mkIf (config.services.searx.enable && config.host.reverse_proxy.enable) {
 | 
						|
    host = {
 | 
						|
      reverse_proxy.subdomains.searx = {
 | 
						|
        subdomain = config.services.searx.subdomain;
 | 
						|
        target = "http://localhost:${toString config.services.searx.settings.server.port}";
 | 
						|
      };
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |