dotfiles/system/nixos/invidious.nix

59 lines
1 KiB
Nix
Raw Normal View History

2023-03-20 12:49:46 +00:00
{ config, ... }:
let
fqdn = "yt.daniel.sx";
in
{
services.invidious = {
enable = true;
domain = fqdn;
2023-12-28 12:56:18 +00:00
address = "127.0.0.1";
2023-03-20 12:49:46 +00:00
port = 8007;
database = {
createLocally = true;
2023-03-20 12:49:46 +00:00
};
settings = {
db = {
user = "invidious";
dbname = "invidious";
};
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;
channel_refresh_interval = "15m";
2023-03-20 12:49:46 +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}" = {
listenAddresses = [ "100.64.10.2" "[fd7a:115c:a1e0:1010::2]" ];
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";
};
};
}