This repository has no description
752 B
26 lines
1{ pkgs, ... }:
2{
3 services.nginx.virtualHosts."radio.lassul.us" = {
4 enableACME = true;
5 addSSL = true;
6 locations."/" = {
7 # recommendedProxySettings = true;
8 proxyWebsockets = true;
9 proxyPass = "http://radio.r";
10 extraConfig = ''
11 proxy_set_header Host radio.r;
12 # get source ip for weather reports
13 proxy_set_header user-agent "$http_user_agent; client-ip=$remote_addr";
14 '';
15 };
16 };
17 krebs.htgen.radio-redirect = {
18 port = 8000;
19 scriptFile = pkgs.writers.writeDash "redir" ''
20 printf 'HTTP/1.1 301 Moved Permanently\r\n'
21 printf "Location: http://radio.lassul.us''${Request_URI}\r\n"
22 printf '\r\n'
23 '';
24 };
25 networking.firewall.allowedTCPPorts = [ 8000 ];
26}