Add beets music library manager

This commit is contained in:
Tyler Beckman 2024-11-29 15:39:02 -07:00
parent e5c8cb4d5c
commit 4066def048
Signed by: Ty
GPG key ID: 2813440C772555A4
6 changed files with 43 additions and 3 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
./secrets.nix

View file

@ -1,11 +1,10 @@
{ inputs, system, ... }: { inputs, system, secrets, ... }:
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
home-manager.extraSpecialArgs = { home-manager.extraSpecialArgs = {
inherit inputs; inherit inputs system secrets;
inherit system;
}; };
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";

View file

@ -16,5 +16,6 @@
./modules/vscode.nix ./modules/vscode.nix
./modules/desktop.nix ./modules/desktop.nix
./modules/gtk.nix ./modules/gtk.nix
./modules/beets.nix
]; ];
} }

View file

@ -0,0 +1,23 @@
{ lib, secrets, ... }:
{
programs.beets = {
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;
};
};
};
}

8
secrets.example.nix Normal file
View file

@ -0,0 +1,8 @@
{
programs = {
beets = {
# The API key to use for google custom search lyrics backend
google_api_key = null;
};
};
}

8
secrets.nix Normal file
View file

@ -0,0 +1,8 @@
{
programs = {
beets = {
# The API key to use for google custom search lyrics backend
google_api_key = "AIzaSyAWg0jEt2wPXNo2Q6dx2yvihT1FqkG26I4";
};
};
}