30 lines
513 B
Nix
30 lines
513 B
Nix
|
{ ... }:
|
||
|
{
|
||
|
services.nginx = {
|
||
|
enable = true;
|
||
|
|
||
|
virtualHosts."_" = {
|
||
|
listen = [{
|
||
|
addr = "0.0.0.0";
|
||
|
port = 80;
|
||
|
}];
|
||
|
locations."/" = {
|
||
|
return = "301 https://$host$request_uri";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
streamConfig = ''
|
||
|
map $ssl_preread_server_name $address {
|
||
|
jellyfin.grzb.de 10.202.46.101:8443;
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 0.0.0.0:443;
|
||
|
proxy_pass $address;
|
||
|
ssl_preread on;
|
||
|
proxy_protocol on;
|
||
|
}
|
||
|
'';
|
||
|
};
|
||
|
}
|