changed invidious to standalone

This commit is contained in:
mc-fucker 2022-08-01 15:26:50 +02:00
parent cf2d446c1a
commit 687569a09f

View file

@ -1,11 +1,15 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
let
iv_port = "3001";
domain = "yt.mc-fucker.cool";
in
{
services.invidious = {
#package = pkgs.callPackage /root/invidious {
# lsquic = pkgs.callPackage /root/invidious/lsquic.nix {};
#};
enable = true;
port = 3001;
port = (lib.strings.toInt iv_port);
database = {
createLocally = false;
host = "postgres";
@ -24,6 +28,26 @@
Restart = "always";
RestartSec = "2s";
};
services.nginx.virtualHosts."${domain}" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
proxyPass = "http://127.0.0.1:${iv_port}";
extraConfig = ''
set $empty "";
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
'';
};
};
};
}
# vim: set et ts=2 sw=2 ai: