This commit is contained in:
4DBug
2026-02-11 00:13:54 -06:00
parent 28d89fe278
commit ee4237c6d6
10 changed files with 88 additions and 1100 deletions

View File

@@ -1,28 +1,56 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, ... }:
let
companionPort = 8282;
companionPath = "/companion";
companionKey = "kKg3RKeZjE7frmuw";
in
{
services.invidious = {
enable = true;
virtualisation.podman.enable = true;
virtualisation.oci-containers.backend = lib.mkDefault "podman";
domain = "tube.bug.tools";
virtualisation.oci-containers.containers.invidious-companion = {
image = "quay.io/invidious/invidious-companion:latest";
extraOptions = [ "--network=host" "--pull=always" ];
port = 3030;
environment = {
SERVER_SECRET_KEY = companionKey;
HOST = "127.0.0.1";
PORT = toString companionPort;
SERVER_BASE_URL = "http://127.0.0.1:${toString companionPort}";
database.createLocally = true;
settings = {
https_only = true;
external_port = 443;
registration_enabled = false;
login_enabled = true;
popular_enabled = true;
default_user_preferences = {
local = true;
};
# HTTP_PROXY = "http://proxy.example:3128";
# HTTPS_PROXY = "http://proxy.example:3128";
# NO_PROXY = "127.0.0.1,localhost";
};
};
}
services.invidious = {
enable = true;
package = pkgs.invidious;
address = "127.0.0.1";
port = 3030;
nginx.enable = false;
sig-helper.enable = false;
settings = {
domain = "tube.bug.tools";
https_only = true;
external_port = 3030;
invidious_companion = [
{ private_url = "http://127.0.0.1:${toString companionPort}${companionPath}"; }
];
invidious_companion_key = companionKey;
};
};
systemd.services.invidious = let dep = "podman-invidious-companion.service"; in {
wants = [ dep ];
after = [ dep ];
requires = [ dep ];
};
}