changed invidious to standalone
This commit is contained in:
parent
cf2d446c1a
commit
687569a09f
1 changed files with 26 additions and 2 deletions
|
|
@ -1,11 +1,15 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
iv_port = "3001";
|
||||||
|
domain = "yt.mc-fucker.cool";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.invidious = {
|
services.invidious = {
|
||||||
#package = pkgs.callPackage /root/invidious {
|
#package = pkgs.callPackage /root/invidious {
|
||||||
# lsquic = pkgs.callPackage /root/invidious/lsquic.nix {};
|
# lsquic = pkgs.callPackage /root/invidious/lsquic.nix {};
|
||||||
#};
|
#};
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 3001;
|
port = (lib.strings.toInt iv_port);
|
||||||
database = {
|
database = {
|
||||||
createLocally = false;
|
createLocally = false;
|
||||||
host = "postgres";
|
host = "postgres";
|
||||||
|
|
@ -24,6 +28,26 @@
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = "2s";
|
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:
|
# vim: set et ts=2 sw=2 ai:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue