diff options
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" '' |