2023-03-20 12:49:46 +00:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
fqdn = "yt.daniel.sx";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
services.invidious = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
domain = fqdn;
|
|
|
|
port = 8007;
|
|
|
|
|
|
|
|
database = {
|
|
|
|
createLocally = false;
|
|
|
|
host = "10.99.99.3";
|
|
|
|
port = 5432;
|
2023-03-20 13:07:23 +00:00
|
|
|
passwordFile = config.age.secrets.invidious-database-password.path;
|
2023-03-20 12:49:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
db = {
|
|
|
|
user = "invidious";
|
|
|
|
dbname = "invidious";
|
|
|
|
};
|
|
|
|
|
|
|
|
host_binding = "127.0.0.1";
|
2023-03-20 14:05:57 +00:00
|
|
|
external_port = 443;
|
2023-03-20 12:49:46 +00:00
|
|
|
https_only = true;
|
|
|
|
|
2023-03-22 10:13:57 +00:00
|
|
|
use_quic = true;
|
|
|
|
|
2023-03-20 12:49:46 +00:00
|
|
|
statistics_enabled = false;
|
|
|
|
|
2023-03-20 13:10:00 +00:00
|
|
|
registration_enabled = false;
|
2023-03-20 12:49:46 +00:00
|
|
|
login_enabled = true;
|
|
|
|
captcha_enabled = false;
|
2023-03-22 10:13:57 +00:00
|
|
|
admins = [ ];
|
2023-03-20 12:49:46 +00:00
|
|
|
|
|
|
|
use_pubsub_feeds = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
nginx.enable = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."${fqdn}" = {
|
2023-04-03 12:52:41 +00:00
|
|
|
listenAddresses = [ "100.113.242.85" "[fd7a:115c:a1e0:ab12:4843:cd96:6271:f255]" ];
|
2023-04-03 13:03:52 +00:00
|
|
|
quic = true;
|
2023-03-20 12:49:46 +00:00
|
|
|
http3 = true;
|
|
|
|
|
|
|
|
onlySSL = true;
|
|
|
|
useACMEHost = "daniel.sx";
|
|
|
|
|
|
|
|
locations."/" = {
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
proxyPass = "http://127.0.0.1:8007";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|