aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/in/invidious-router/module.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-30 14:05:39 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-30 14:05:39 +0200
commitc153a351659e4596acfc31f00bf594343cbfcd68 (patch)
treea9ed83de07711d6424fbea09aad28891bae5bfe4 /modules/by-name/in/invidious-router/module.nix
parenthosts/server3: Setup prometheus server in agent mode (diff)
downloadnixos-server-c153a351659e4596acfc31f00bf594343cbfcd68.zip
modules: Use namespaces
That might make it easier in the future to merge different server configs together (and thusly facilitate code-reuse.).
Diffstat (limited to 'modules/by-name/in/invidious-router/module.nix')
-rw-r--r--modules/by-name/in/invidious-router/module.nix70
1 files changed, 0 insertions, 70 deletions
diff --git a/modules/by-name/in/invidious-router/module.nix b/modules/by-name/in/invidious-router/module.nix
deleted file mode 100644
index 750f852..0000000
--- a/modules/by-name/in/invidious-router/module.nix
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}: let
- cfg = config.vhack.invidious-router;
-in {
- options.vhack.invidious-router = {
- enable = lib.mkEnableOption "invidious-router";
- domain = lib.mkOption {
- type = lib.types.str;
- description = "The domain invidious-router should be served on";
- };
- extraDomains = lib.mkOption {
- type = lib.types.listOf lib.types.str;
- default = [];
- description = "Addtional domains invidious-router should be served on";
- };
- };
- config = lib.mkIf cfg.enable {
- services.invidious-router = {
- enable = true;
- package = pkgs.invidious-router;
- settings = {
- app = {
- listen = "127.0.0.1:8050";
- enable_youtube_fallback = false;
- reload_instance_list_interval = "60s";
- not_available_message = ''
- No available invidious instance found!
- [link]View this video on YouTube[/link], a proprietary
- platform that collects and uses your data without respecting
- your privacy.
- '';
- };
- api = {
- enabled = true;
- url = "https://api.invidious.io/instances.json";
- filter_regions = false;
- allowed_regions = [
- "AT"
- "DE"
- "CH"
- ];
- };
- healthcheck = {
- path = "/watch?v=uSvJaYxRoB4";
- 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 = false;
- text_not_present = "YouTube is currently trying to block Invidious instances";
- };
- };
- nginx = {
- enable = true;
- inherit (cfg) domain extraDomains;
- };
- };
- vhack.nginx.enable = true;
- };
-}