{ lib, secrets, config, pkgs, ... }: { programs.beets = lib.mkIf config.meta.home-manager.beets.enable { enable = true; package = pkgs.beets.override { pluginOverrides = { # Build for some GPU lang LLVM dependency failed on hydra as of disabling, and I don't use it # TODO: Switch to using disableAllPlugins for an allowlist of plugins autobpm.enable = false; }; }; 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; }; }; }; }