2023-03-20 12:49:46 +00:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
fqdn = "yt.daniel.sx";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
services.invidious = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
domain = fqdn;
|
|
|
|
port = 8007;
|
|
|
|
|
|
|
|
database = {
|
2023-06-21 12:21:40 +00:00
|
|
|
createLocally = true;
|
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;
|
2023-04-04 10:27:43 +00:00
|
|
|
channel_refresh_interval = "15m";
|
2023-03-20 12:49:46 +00:00
|
|
|
};
|
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
extraSettingsFile = config.age.secrets.invidious-extra-settings.path;
|
|
|
|
|
2023-03-20 12:49:46 +00:00
|
|
|
nginx.enable = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."${fqdn}" = {
|
2023-06-21 12:21:40 +00:00
|
|
|
listenAddresses = [ "100.108.165.26" "[fd7a:115c:a1e0:ab12:4843:cd96:626c:a51a]" ];
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|