about summary refs log tree commit diff
path: root/modules/beets.nix
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2025-02-17 02:21:56 +0300
committerazahi <azat@bahawi.net>2025-02-17 02:21:56 +0300
commit59180328cda59817d71cd58c8f48ead047375064 (patch)
tree2cdd7d1bfa309839ef624c19daf283f510aacf69 /modules/beets.nix
parent2025-02-05 (diff)
2025-02-17
Diffstat (limited to '')
-rw-r--r--modules/beets.nix26
1 files changed, 20 insertions, 6 deletions
diff --git a/modules/beets.nix b/modules/beets.nix
index 3141e4d..092b384 100644
--- a/modules/beets.nix
+++ b/modules/beets.nix
@@ -4,14 +4,13 @@
   pkgs,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.beets;
 in
 {
-  options.nixfiles.modules.beets.enable = mkEnableOption "beets";
+  options.nixfiles.modules.beets.enable = lib.mkEnableOption "beets";
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     hm =
       let
         beetsdir = "${config.dirs.data}/beets";
@@ -36,7 +35,7 @@ in
             settings = {
               library = "${beetsdir}/library.db";
               directory = config.userDirs.music;
-              plugins = concatStringsSep " " [
+              plugins = lib.concatStringsSep " " [
                 "badfiles"
                 "edit"
                 "fetchart"
@@ -61,6 +60,23 @@ in
                 quiet = false;
                 bell = true;
               };
+              musicbrainz = {
+                extra_tags = [
+                  "year"
+                  "catalognum"
+                  "country"
+                  "media"
+                  "label"
+                ];
+                external_ids = {
+                  bandcamp = true;
+                  beatport = false;
+                  deezer = false;
+                  discogs = true;
+                  spotify = false;
+                  tidal = false;
+                };
+              };
               match = {
                 preferred = {
                   countries = [
@@ -77,8 +93,6 @@ in
                     "CA"
                     "AU"
                     "NZ"
-                    "US"
-                    "XW"
                   ];
                   original_year = true;
                 };

Consider giving Nix/NixOS a try! <3