2024-12-11 20:09:53 -07:00
|
|
|
{ secrets, lib, ty-home-manager-options, ... }:
|
2024-12-04 13:28:30 -07:00
|
|
|
{
|
2024-12-11 20:09:53 -07:00
|
|
|
config = lib.mkIf ty-home-manager-options.rescrobbled.enable {
|
|
|
|
services.custom.rescrobbled = let s = secrets.programs.rescrobbled; in lib.mkIf s.enable {
|
|
|
|
enable = true;
|
2024-12-04 13:28:30 -07:00
|
|
|
|
2024-12-11 20:09:53 -07:00
|
|
|
session = s.lastfm.session;
|
2024-12-04 13:28:30 -07:00
|
|
|
|
2024-12-11 20:09:53 -07:00
|
|
|
settings = {
|
|
|
|
player-whitelist = [ "elisa" ];
|
2024-12-04 13:28:30 -07:00
|
|
|
|
2024-12-11 20:09:53 -07:00
|
|
|
listenbrainz = lib.mkIf (s.listenbrainz.token != null) [
|
|
|
|
{
|
|
|
|
token = s.listenbrainz.token;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
lastfm-key = lib.mkIf (s.lastfm.key != null && s.lastfm.secret != null) s.lastfm.key;
|
|
|
|
lastfm-secret = lib.mkIf (s.lastfm.key != null && s.lastfm.secret != null) s.lastfm.secret;
|
|
|
|
};
|
2024-12-04 13:28:30 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|