[spotifyd] Update to lean in on pulseaudio
This commit is contained in:
@@ -19,6 +19,10 @@ with lib;
|
||||
autologin = true;
|
||||
wayland = true;
|
||||
};
|
||||
spotifyd = {
|
||||
enable = true;
|
||||
deviceType = "t_v";
|
||||
};
|
||||
users.enable = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,29 +8,38 @@ in
|
||||
{
|
||||
options.roles.spotifyd = {
|
||||
enable = mkEnableOption "Enable the spotifyd role";
|
||||
deviceType = mkOption {
|
||||
default = "computer";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
roles.audio.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
hardware.pulseaudio.extraConfig = ''
|
||||
unload-module module-native-protocol-unix
|
||||
load-module module-native-protocol-unix auth-anonymous=1
|
||||
'';
|
||||
hardware.pulseaudio.systemWide = true;
|
||||
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
use_mpris = false;
|
||||
backend = "alsa";
|
||||
device = "sysdefault";
|
||||
backend = "pulseaudio";
|
||||
bitrate = 320;
|
||||
cache_path = "";
|
||||
zeroconf_port = 1234;
|
||||
zeroconf_port = 5354;
|
||||
autoplay = false;
|
||||
device_type = cfg.deviceType;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
1234
|
||||
5354
|
||||
57621
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
|
||||
Reference in New Issue
Block a user