forked from
lass.pds.lassul.us/superconfig
This repository has no description
1.5 kB
50 lines
1_: {
2 services.nginx.virtualHosts."radio.lassul.us" = {
3 enableACME = true;
4 addSSL = true;
5 locations."/" = {
6 # recommendedProxySettings = true;
7 proxyWebsockets = true;
8 proxyPass = "http://radio.r";
9 extraConfig = ''
10 proxy_set_header Host radio.r;
11 # get source ip for weather reports
12 proxy_set_header user-agent "$http_user_agent; client-ip=$remote_addr";
13 '';
14 };
15 locations."/wish" = {
16 # recommendedProxySettings = true;
17 proxyWebsockets = true;
18 proxyPass = "http://radio.r:8002/wish";
19 extraConfig = ''
20 proxy_set_header Host radio.r;
21 # get source ip for weather reports
22 proxy_set_header user-agent "$http_user_agent; client-ip=$remote_addr";
23 '';
24 };
25 locations."/all_tracks" = {
26 # recommendedProxySettings = true;
27 proxyWebsockets = true;
28 proxyPass = "http://radio.r:8002/all_tracks";
29 extraConfig = ''
30 proxy_set_header Host radio.r;
31 # get source ip for weather reports
32 proxy_set_header user-agent "$http_user_agent; client-ip=$remote_addr";
33 '';
34 };
35 };
36 services.nginx.virtualHosts.radio-redirect = {
37 listen = [
38 {
39 addr = "0.0.0.0";
40 port = 8000;
41 }
42 {
43 addr = "[::]";
44 port = 8000;
45 }
46 ];
47 locations."/".return = "301 http://radio.lassul.us$request_uri";
48 };
49 networking.firewall.allowedTCPPorts = [ 8000 ];
50}