Add Spotify Connect receiver using librespot
This commit is contained in:
parent
abce3dee7a
commit
28cd59c957
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./librespot.nix
|
||||
./networking.nix
|
||||
./shairport-sync.nix
|
||||
];
|
||||
|
|
32
config/hosts/audio/librespot.nix
Normal file
32
config/hosts/audio/librespot.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Sources for this configuration:
|
||||
# - https://github.com/librespot-org/librespot
|
||||
# - https://github.com/librespot-org/librespot/wiki/Options
|
||||
# - https://github.com/librespot-org/librespot/wiki/Audio-Backends
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.services.spotify-connect-receiver = {
|
||||
enable = true;
|
||||
description = "Spotify Connect Receiver Using librespot";
|
||||
unitConfig = {
|
||||
Requires = [ "network-online.target" "pipewire.service" ];
|
||||
After = [ "network-online.target" "pipewire.service" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.librespot}/bin/librespot --name 'Z9 Hauptraum' --device-type speaker --bitrate 320 --enable-volume-normalisation --disable-audio-cache --disable-credential-cache --quiet";
|
||||
User = "librespot";
|
||||
Group = "librespot";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
users = {
|
||||
users.librespot = {
|
||||
isSystemUser = true;
|
||||
group = "librespot";
|
||||
extraGroups = [ "pipewire" ];
|
||||
};
|
||||
groups.librespot = { };
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue