summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-09-03 12:12:33 +0200
committerlassulus <git@lassul.us>2023-09-03 12:12:33 +0200
commit63fc24339c838c8596ee535590a4c756bc5573ce (patch)
tree1548405b3a83b6271c56b57463e577197bd8c29f /lass/2configs
parentbb29da920769395db909ee3e1fa373a3e122a98e (diff)
l snapserver: add radio stream
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/snapserver.nix23
1 files changed, 20 insertions, 3 deletions
diff --git a/lass/2configs/snapserver.nix b/lass/2configs/snapserver.nix
index 3c6dbf750..60aa97077 100644
--- a/lass/2configs/snapserver.nix
+++ b/lass/2configs/snapserver.nix
@@ -2,12 +2,29 @@
{
services.snapserver = {
enable = true;
- openFirewall = true;
- streams = {
- pipewire = {
+ # 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 = {
type = "pipe";
location = "/run/snapserver/snapfifo";
};
};
+ http.enable = true;
};
+
+ networking.firewall.interfaces.int0.allowedTCPPorts = [ 1704 1705 1780 ];
+ networking.firewall.interfaces.retiolum.allowedTCPPorts = [ 1780 ];
}