nix/home-manager/modules/beets.nix

23 lines
No EOL
814 B
Nix

{ lib, secrets, ty-home-manager-options, ... }:
{
programs.beets = lib.mkIf ty-home-manager-options.beets.enable {
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;
};
};
};
}