1
0
mirror of https://github.com/kmein/niveum synced 2026-03-17 18:41:09 +01:00
Files
niveum/systems/zaatar/spotifyd.nix

34 lines
881 B
Nix
Raw Normal View History

{
2022-03-10 21:52:12 +01:00
config,
pkgs,
lib,
...
}: {
services.spotifyd = {
enable = true;
settings = {
2020-05-20 00:06:26 +02:00
global = {
username_cmd = "cat ${config.age.secrets.spotify-username.path}";
password_cmd = "cat ${config.age.secrets.spotify-password.path}";
backend = "pulseaudio";
bitrate = 320;
device_type = "s_t_b"; # set-top box
device_name = config.networking.hostName;
2020-05-20 00:06:26 +02:00
};
};
2020-05-20 00:06:26 +02:00
};
2020-12-20 19:21:09 +01:00
age.secrets = {
spotify-username.file = ../../secrets/spotify-username.age;
spotify-password.file = ../../secrets/spotify-password.age;
};
# 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
'';
2020-12-20 19:21:09 +01:00
systemd.services.spotifyd.serviceConfig.Restart = "always";
2020-05-20 00:06:26 +02:00
}