mirror of
https://github.com/kmein/niveum
synced 2026-03-20 20:01:08 +01:00
fix(spotifyd): run correctly with systemWide pulseaudio
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
services.spotifyd = {
|
services.spotifyd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -6,9 +6,19 @@
|
|||||||
global = {
|
global = {
|
||||||
username = lib.strings.fileContents <secrets/spotify/username>;
|
username = lib.strings.fileContents <secrets/spotify/username>;
|
||||||
password = lib.strings.fileContents <secrets/spotify/password>;
|
password = lib.strings.fileContents <secrets/spotify/password>;
|
||||||
|
backend = "pulseaudio";
|
||||||
|
bitrate = 320;
|
||||||
|
device_type = "s_t_b"; # set-top box
|
||||||
|
device_name = config.networking.hostName;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ref https://github.com/NixOS/nixpkgs/issues/71362#issuecomment-753461502
|
||||||
|
hardware.pulseaudio.extraConfig = ''
|
||||||
|
unload-module module-native-protocol-unix
|
||||||
|
load-module module-native-protocol-unix auth-anonymous=1
|
||||||
|
'';
|
||||||
|
|
||||||
systemd.services.spotifyd.serviceConfig.Restart = "always";
|
systemd.services.spotifyd.serviceConfig.Restart = "always";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user