nix/home-manager/modules/beets.nix

23 lines
814 B
Nix
Raw Normal View History

{ lib, secrets, ty-home-manager-options, ... }:
2024-12-02 03:57:34 -07:00
{
programs.beets = lib.mkIf ty-home-manager-options.beets.enable {
2024-12-02 03:57:34 -07:00
enable = true;
settings = {
directory = "~/Music";
library = "~/Music/library.db";
plugins = "fetchart lyrics lastgenre";
lyrics = {
synced = "yes";
auto = "yes";
force = "yes";
sources = with secrets.programs.beets; lib.mkMerge [
(lib.mkIf (google_api_key != null) "lrclib google genius tekstowo")
(lib.mkIf (google_api_key == null) "lrclib genius tekstowo")
];
google_API_key = with secrets.programs.beets; lib.mkIf (google_api_key != null) google_api_key;
};
};
};
}