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:00:36 +00:00
|
|
|
passwordFile = "%d/databasePassword";
|
2023-03-20 12:49:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
db = {
|
|
|
|
user = "invidious";
|
|
|
|
dbname = "invidious";
|
|
|
|
};
|
|
|
|
|
|
|
|
host_binding = "127.0.0.1";
|
|
|
|
|
|
|
|
https_only = true;
|
|
|
|
|
|
|
|
statistics_enabled = false;
|
|
|
|
|
|
|
|
registration_enabled = true;
|
|
|
|
login_enabled = true;
|
|
|
|
captcha_enabled = false;
|
|
|
|
admins = [ "daniel" ];
|
|
|
|
|
|
|
|
use_pubsub_feeds = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
nginx.enable = false;
|
|
|
|
};
|
|
|
|
|
2023-03-20 13:00:36 +00:00
|
|
|
systemd.services.invidious.serviceConfig.LoadCredential = "databasePassword:${config.age.secrets.invidious-database-password.path}";
|
|
|
|
|
2023-03-20 12:49:46 +00:00
|
|
|
services.nginx.virtualHosts."${fqdn}" = {
|
|
|
|
http3 = true;
|
|
|
|
|
|
|
|
onlySSL = true;
|
|
|
|
useACMEHost = "daniel.sx";
|
|
|
|
basicAuthFile = config.age.secrets.invidious-auth.path;
|
|
|
|
|
|
|
|
locations."/" = {
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
proxyPass = "http://127.0.0.1:8007";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|