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;
|
|
|
|
|
|
|
|
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;
|
|
|
|
admins = [ "daniel" ];
|
|
|
|
|
|
|
|
use_pubsub_feeds = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
nginx.enable = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."${fqdn}" = {
|
2023-03-20 13:24:04 +00:00
|
|
|
listenAddresses = [ "100.113.242.85" ];
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|