27 lines
626 B
Nix
27 lines
626 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
services.snapserver = {
|
|
enable = true;
|
|
codec = "flac";
|
|
http.docRoot = "${pkgs.snapcast}/share/snapserver/snapweb";
|
|
streams = {
|
|
pipewire = {
|
|
type = "pipe";
|
|
location = "/run/snapserver/pipewire";
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.user.services.snapcast-sink = {
|
|
wantedBy = [ "pipewire.service" ];
|
|
after = [ "pipewire.service" ];
|
|
bindsTo = [ "pipewire.service" ];
|
|
path = with pkgs; [ gawk pulseaudio ];
|
|
script = ''
|
|
pactl load-module module-pipe-sink file=/run/snapserver/pipewire sink_name=Snapcast format=s16le rate=48000
|
|
'';
|
|
};
|
|
|
|
}
|