Add beets music library manager
This commit is contained in:
parent
e5c8cb4d5c
commit
4066def048
6 changed files with 43 additions and 3 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
./secrets.nix
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
];
|
];
|
||||||
}
|
}
|
23
home-manager/modules/beets.nix
Normal file
23
home-manager/modules/beets.nix
Normal 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
8
secrets.example.nix
Normal 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
8
secrets.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
beets = {
|
||||||
|
# The API key to use for google custom search lyrics backend
|
||||||
|
google_api_key = "AIzaSyAWg0jEt2wPXNo2Q6dx2yvihT1FqkG26I4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue