summary refs log blame commit diff stats
path: root/system/services/invidious-router/default.nix
blob: 86a92f98ba7f69ab6284faba20b2a8ed15fa86f6 (plain) (tree)
1
2
3
4
5
6
7
8

                               
                
             
                                  
                                              

                       
                                                        
                              



                           

                     

                                




                                   

                                                                                      



                                          

                            
      
    
{...}: {
  services.invidious-router = {
    enable = true;
    settings = {
      app = {
        listen = "127.0.0.1:8050";
        enable_youtube_fallback = false;
        reload_instance_list_interval = "60s";
      };
      api = {
        enabled = true;
        url = "https://api.invidious.io/instances.json";
        filter_regions = true;
        allowed_regions = [
          "AT"
          "DE"
          "CH"
        ];
      };
      healthcheck = {
        path = "/";
        allowed_status_codes = [
          200
        ];
        timeout = "1s";
        interval = "10s";
        filter_by_response_time = {
          enabled = true;
          qty_of_top_results = 4;
        };
        minimum_ratio = 0.2;
        remove_no_ratio = true;
        text_not_present = "YouTube is currently trying to block Invidious instances";
      };
    };
    nginx = {
      enable = true;
      domain = "invidious-router.sils.li";
      extraDomains = [
        "video.fosswelt.org"
      ];
    };
  };
}