stockholm/lass/2configs/snapserver.nix

31 lines
815 B
Nix
Raw Normal View History

2022-09-18 10:17:18 +00:00
{ config, lib, pkgs, ... }:
{
services.snapserver = {
enable = true;
2023-09-03 10:12:33 +00:00
# openFirewall = true;
streams = {
radio = {
type = "process";
location = pkgs.writers.writeDash "radio" ''
exec ${pkgs.mpv}/bin/mpv http://radio.lassul.us/radio.ogg \
--no-terminal \
--audio-display=no \
--audio-channels=stereo \
--audio-samplerate=48000 \
--audio-format=s16 \
--ao=pcm \
--ao-pcm-file=/dev/stdout
'';
};
styx = {
2022-09-18 10:17:18 +00:00
type = "pipe";
location = "/run/snapserver/snapfifo";
};
};
2023-09-03 10:12:33 +00:00
http.enable = true;
2022-09-18 10:17:18 +00:00
};
2023-09-03 10:12:33 +00:00
networking.firewall.interfaces.int0.allowedTCPPorts = [ 1704 1705 1780 ];
networking.firewall.interfaces.retiolum.allowedTCPPorts = [ 1780 ];
2022-09-18 10:17:18 +00:00
}