diff options
author | tv <tv@krebsco.de> | 2021-07-29 13:27:27 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2021-07-29 13:27:27 +0200 |
commit | dfc3a69a141927a2ef9a13129496d1a84de8efeb (patch) | |
tree | 54e24720d18bfccbb638e10ab8076a5b9763addf /lass/2configs/radio.nix | |
parent | 34c7d727afd14a82330dd6e53dee3591f01a5462 (diff) | |
parent | 1380200b30f2fd1dfce55a2ba28dc256fef951c6 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'lass/2configs/radio.nix')
-rw-r--r-- | lass/2configs/radio.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index a474b0ebc..b1e1ed4d9 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -225,7 +225,7 @@ in { ${pkgs.mpc_cli}/bin/mpc idle player > /dev/null ${pkgs.mpc_cli}/bin/mpc current -f %file% done | while read track; do - listeners=$(${pkgs.iproute}/bin/ss -Hno state established 'sport = :8000' | grep '^mptcp' | wc -l) + listeners=$(${pkgs.iproute}/bin/ss -Hno state established 'sport = :8000' | grep '^tcp' | wc -l) echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE" echo "$(tail -$LIMIT "$HISTORY_FILE")" > "$HISTORY_FILE" ${set_irc_topic} "playing: $track listeners: $listeners" @@ -347,6 +347,19 @@ in { locations."= /recent".extraConfig = '' alias /tmp/played; ''; + locations."= /current".extraConfig = '' + proxy_pass http://localhost:8001; + ''; + locations."= /skip".extraConfig = '' + proxy_pass http://localhost:8001; + ''; + locations."= /good".extraConfig = '' + proxy_pass http://localhost:8001; + ''; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + ''; }; virtualHosts."lassul.us".locations."= /the_playlist".extraConfig = let html = pkgs.writeText "index.html" '' |