Switch to spotifyd

This commit is contained in:
SebastianStork 2024-04-27 23:05:51 +02:00
parent c170ec09db
commit 4d42f548fd
6 changed files with 71 additions and 4 deletions

27
modules/home/spotifyd.nix Normal file
View file

@ -0,0 +1,27 @@
{
config,
lib,
osConfig,
...
}: {
options.myConfig.spotifyd.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.spotifyd.enable {
sops.secrets = {
"spotify/username" = {};
"spotify/password" = {};
};
services.spotifyd = {
enable = true;
settings.global = {
username_cmd = "cat ${config.sops.secrets."spotify/username".path}";
password_cmd = "cat ${config.sops.secrets."spotify/password".path}";
backend = "pulseaudio";
device_name = "${osConfig.networking.hostName}";
device_type = "computer";
};
};
};
}