This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / configs / snapserver.nix
1.3 kB 44 lines
1{ pkgs, ... }: 2{ 3 services.snapserver = { 4 enable = true; 5 # openFirewall = true; 6 settings.stream = { 7 source = [ 8 "process://${pkgs.writers.writeDash "radio" '' 9 exec ${pkgs.mpv}/bin/mpv http://radio.lassul.us/radio.ogg \ 10 --no-terminal \ 11 --audio-display=no \ 12 --audio-channels=stereo \ 13 --audio-samplerate=48000 \ 14 --audio-format=s16 \ 15 --ao=pcm \ 16 --ao-pcm-file=/dev/stdout 17 ''}?name=radio" 18 "pipe:///run/snapserver/snapfifo?name=styx" 19 ]; 20 }; 21 http.enable = true; 22 tcp.enable = true; 23 }; 24 25 # Runs on the gg23 router: the LAN (int0) is trusted there 26 # (configs/gg23.nix), et0 is the WAN and stays closed. 27 networking.firewall.interfaces.retiolum.allowedTCPPorts = [ 1780 ]; 28 29 # plays an iptv channel into the "styx" pipe stream 30 environment.systemPackages = [ 31 (pkgs.writers.writeDashBin "iptv" '' 32 set -efu 33 ${pkgs.mpv}/bin/mpv \ 34 --audio-display=no --audio-channels=stereo \ 35 --audio-samplerate=48000 --audio-format=s16 \ 36 --ao-pcm-file=/run/snapserver/snapfifo --ao=pcm \ 37 --audio-delay=-1 \ 38 --playlist=https://iptv-org.github.io/iptv/index.nsfw.m3u \ 39 --idle=yes \ 40 --input-ipc-server=/tmp/mpv.ipc \ 41 "$@" 42 '') 43 ]; 44}