add beets to media

This commit is contained in:
Sakooooo 2025-01-11 16:00:27 +04:00
parent 14fe6d9470
commit bf6a2cdf8f
Signed by: sako
GPG key ID: FE52FD65B76E4751
2 changed files with 35 additions and 7 deletions

34
modules/media/beets.nix Normal file
View file

@ -0,0 +1,34 @@
{ outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.media.beets;
in {
options.modules.media.beets = { enable = lib.mkEnableOption false; };
config = lib.mkIf cfg.enable {
home-manager.users.sako = {
programs.beets = {
enable = true;
settings = {
plugins = [ "fetchart" "embedart" "scrub" "replaygain" "chroma" ];
directory = "/srv/media/music";
library = "~/.config/beets/library.db";
import = {
write = true;
move = false;
copy = true;
quiet_fallback = "skip";
log = "~/.config/beets/beets.log";
};
paths = {
default = "$albumartist/$album%aunique{}/$track - $title";
singleton = "Non-Album/$artist - $title";
comp = " Compilations/$album%aunique{}/$track - $title";
albumtype_soundtrack = "Soundtracks/$album/$track $title";
};
replaygain.backend = "gstreamer";
embedart.auto = true;
fetchart.auto = true;
};
};
};
};
}

View file

@ -1,7 +1 @@
{
imports = [
./mpd
./ncmpcpp
./mopidy
];
}
{ imports = [ ./mpd ./ncmpcpp ./mopidy ./beets.nix ]; }