summary refs log tree commit diff stats
path: root/system/services/invidious-router/default.nix
blob: b8b1fdf7df587d724f2ee77ab18f8cda3cff117a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{...}: {
  services.invidious-router = {
    enable = true;
    configuration = {
      app = {
        listen = "0.0.0.0:8050";
        enable_youtube_fallback = false;
        reload_instance_list_interval = "60s";
        instances = ["https://invidious.vhack.eu"];
      };
      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;
        };
      };
    };
    nginx = {
      enable = true;
      domain = "invidious-router.sils.li";
      extraDomains = ["video.fosswelt.org"];
    };
  };
}