diff --git a/flake.lock b/flake.lock index 59f3374..af9f8ff 100644 --- a/flake.lock +++ b/flake.lock @@ -30,11 +30,11 @@ ] }, "locked": { - "lastModified": 1746729224, - "narHash": "sha256-9R4sOLAK1w3Bq54H3XOJogdc7a6C2bLLmatOQ+5pf5w=", + "lastModified": 1747226316, + "narHash": "sha256-INBPqK9ogSvw5Q9HJ5H7KI83v6Jc3goAnXN3b2F+eMU=", "owner": "nix-community", "repo": "disko", - "rev": "85555d27ded84604ad6657ecca255a03fd878607", + "rev": "490c0d6bd151e33caa5b2cf0ae37758234e947f6", "type": "github" }, "original": { @@ -90,11 +90,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1747128321, - "narHash": "sha256-vEME+95GNVkPD1G71yE/VNpnfSbTgIDI1oDco1NRJC8=", + "lastModified": 1747215224, + "narHash": "sha256-WKcDe10f+2ocPIugu9saNmXQ+J1CXqC9SrbUSQ56cNU=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "dbfb966a6ff9dde58a39dfc6a20254e46c4494b1", + "rev": "6317599f5c92ccb08af9e910d0707270b6c7b9ab", "type": "github" }, "original": { @@ -357,16 +357,16 @@ "harfbuzz": { "flake": false, "locked": { - "lastModified": 1719502711, - "narHash": "sha256-2ieCf3ftNk851FZBDPVl+7QHWBqD729KiUxUyxi26Yg=", + "lastModified": 1740783589, + "narHash": "sha256-ac8hV7QFuxcKtVb0m6UhOEz6bXGqQr/qkRtIdpNbbWU=", "owner": "harfbuzz", "repo": "harfbuzz", - "rev": "9c03576c49db6e7207d9bcdfe3abd170a809157f", + "rev": "3ef8709829a5884517ad91a97b32b9435b2f20d1", "type": "github" }, "original": { "owner": "harfbuzz", - "ref": "9.0.0", + "ref": "10.4.0", "repo": "harfbuzz", "type": "github" } @@ -378,11 +378,11 @@ ] }, "locked": { - "lastModified": 1747147271, - "narHash": "sha256-ORthkM8I3GpWDK/pjOSXPuxWjLJV2AwWERKQCsjPPAk=", + "lastModified": 1747225851, + "narHash": "sha256-4IbmZrNOdXP143kZEUzxBS5SqyxUlaSHLgdpeJfP2ZU=", "owner": "nix-community", "repo": "home-manager", - "rev": "df556f2a17b7b94148d0275c1a57fed20e62ad18", + "rev": "6bf057fc8326e83bda05a669fc08d106547679fb", "type": "github" }, "original": { @@ -786,11 +786,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1747115632, - "narHash": "sha256-SypEtZQsum43HvIT4HqM1RH8CE3wCWFIO5b5IqC/2FA=", + "lastModified": 1747152040, + "narHash": "sha256-C6xbCOgSAi+a/1Bk1GPdWd5l791neY5YRWxVM/0cYNg=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "44eeba852a6671ab1c7be5ca65a58c49794cef4b", + "rev": "fa50b6e56aaf6c9b32aadc44f7a2e47187e9b6ac", "type": "github" }, "original": { @@ -819,11 +819,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1747113435, - "narHash": "sha256-9oU1mKAM2BZLSots136UA75RIed53YtYgns9TUkr3ck=", + "lastModified": 1747145615, + "narHash": "sha256-U6MhqL4QXLojCOKH5yc8GbfOF7Fas36e1nqcPQx6/zQ=", "owner": "YaLTeR", "repo": "niri", - "rev": "6d083ea49741d6e8e85d5a1d6b6bcaa837d3b5c0", + "rev": "0d6843ea67da91aea37b655be5de92dfeea081b5", "type": "github" }, "original": { @@ -1220,11 +1220,11 @@ ] }, "locked": { - "lastModified": 1735871325, - "narHash": "sha256-6Ta5E4mhSfCP6LdkzkG2+BciLOCPeLKuYTJ6lOHW+mI=", + "lastModified": 1746931022, + "narHash": "sha256-cXn1RsYZjS23n0+YP3TiH7XBlEvy8FA2mG54MdAL6x0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "a599f011db521766cbaf7c2f5874182485554f00", + "rev": "c46d2764319f962b20ce9c03ce6644dd0de87bc9", "type": "github" }, "original": { @@ -1531,11 +1531,11 @@ }, "locked": { "dir": "nix", - "lastModified": 1746809679, - "narHash": "sha256-AnT5xK/a3owTS6eDnDPLUF0cdEMK3SoEPLSNMgyWcpo=", + "lastModified": 1747232062, + "narHash": "sha256-KlJUQIavwnMaXvInYQVsyTBKXVidXYelyGnU3WVw4Ag=", "owner": "wez", "repo": "wezterm", - "rev": "af8d521ef606eaf301de4678ec5270c3723bd915", + "rev": "909573fad98a1cccb802a7e7e1d9f4f44e02a177", "type": "github" }, "original": { @@ -1609,11 +1609,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1746936689, - "narHash": "sha256-K0+DqwpO7bfzjUK/zq2kF2IUyqy7v7WhA/wzyCjFXOw=", + "lastModified": 1747211481, + "narHash": "sha256-zSngC85d2dy8aGWsjqjY+LzHU6an/KVzjaw1DO77dPk=", "owner": "sxyazi", "repo": "yazi", - "rev": "ea90b0477ecc32af7fae9d7fa49fbfb9290875a9", + "rev": "9a0ef6bb20fc405fa58ee52e22e3db58468519c1", "type": "github" }, "original": { @@ -1630,11 +1630,11 @@ ] }, "locked": { - "lastModified": 1747071553, - "narHash": "sha256-EMIzJ+F2DTuOSPD608HaAra9cah87Emz8GjYNGtxpLo=", + "lastModified": 1747229462, + "narHash": "sha256-JC/M6MboP7K0auO+A6MND+D7oPzB4E8J3YPHOVArPQU=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "50065c8bee3f5c20d29bce19037447b2c2006c48", + "rev": "a15a4d2772feb280d0ae2edaddf79dbf7894d594", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c108134..7702143 100644 --- a/flake.nix +++ b/flake.nix @@ -120,12 +120,12 @@ inherit (nixpkgs.lib) genAttrs replaceStrings; inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive; - sys = "x86_64-linux"; + system = "x86_64-linux"; forAllSystems = function: genAttrs [ - "x86_64-linux" + system ] (system: function nixpkgs.legacyPackages.${system}); nameOf = path: replaceStrings [ ".nix" ] [ "" ] (baseNameOf (toString path)); @@ -133,7 +133,10 @@ configArgs = { inherit inputs; nix-config = self; - pkgs-stable = inputs.nixpkgs-stable.legacyPackages.${sys}; + pkgs-stable = import inputs.nixpkgs-stable { + inherit system; + config.allowUnfree = true; + }; }; baseHomeModules = [ @@ -173,7 +176,7 @@ nixosConfigurations = { eddie = nixpkgs.lib.nixosSystem { - system = sys; + inherit system; specialArgs = configArgs; modules = [ inputs.musnix.nixosModules.musnix @@ -192,7 +195,7 @@ }; media-server = nixpkgs.lib.nixosSystem { - system = sys; + inherit system; specialArgs = configArgs; modules = [ home-manager.nixosModules.home-manager @@ -210,7 +213,7 @@ }; services-nixos = nixpkgs.lib.nixosSystem { - system = sys; + inherit system; specialArgs = configArgs; modules = [ inputs.sops-nix.nixosModules.sops diff --git a/modules/home/beets.nix b/modules/home/beets.nix index e4ccc30..1899e88 100644 --- a/modules/home/beets.nix +++ b/modules/home/beets.nix @@ -1,9 +1,155 @@ { config, lib, pkgs, ... }: { - home.packages = with pkgs; [ - beets - ]; + # home.packages = with pkgs; [ + # beets + # ]; + # xdg.configFile."beets/config.yaml".source = ./beets/config.yaml; + + programs.beets = { + enable = true; + package = (pkgs.beets.override { + pluginOverrides = { + fish.enable = true; + discogs.enable = true; + the.enable = true; + duplicates.enable = true; + embedart.enable = true; + fetchart.enable = true; + mbsync.enable = true; + missing.enable = true; + unimported.enable = true; + inline.enable = true; + lastgenre.enable = true; + albumtypes.enable = true; + ftintitle.enable = true; + plexupdate.enable = true; + importadded.enable = true; + edit.enable = true; + info.enable = true; + mpdupdate.enable = true; + fuzzy.enable = true; + }; + }); + mpdIntegration = { + enableUpdate = true; + }; + settings = { + directory = "/mnt/filez/media/Music"; + library = "~/.config/beets/library.db"; + asciify_paths = "yes"; + import = { + move = "yes"; + copy = "no"; + write = "yes"; + autotag = "yes"; + incremental = "yes"; + incremental_skip_later = "yes"; + resume = "ask"; + quiet_fallback = "asis"; + log = "~/beets.log"; + none_rec_action = "asis"; + duplicate_action = "merge"; + default_action = "asis"; + }; + # plugins = "fish discogs the duplicates embedart fetchart mbsync missing unimported inline lastgenre albumtypes ftintitle plexupdate importadded edit info mpdupdate"; + match = { + ignored_media = [ + "Data CD" + "DVD" + "DVD-Video" + "Blu-ray" + "HD-DVD" + "VCD" + "SVCD" + "UMD" + "VHS" + ]; + preferred = { + countries = [ + "US" + "CA" + "GB|UK" + ]; + original_year = "yes"; + }; + }; + item_fields = { + multidisc = "1 if disctotal > 1 else 0"; + }; + unimported = { + ignore_extensions = "jpg png"; + ignore_subdirectories = "NonMusic data temp"; + }; + discogs = { + user_token = "FhRYPcATYbmLajnzLMTqzwovNGFvZeMdVxIHsAAn"; + index_tracks = "yes"; + append_style_genre = "yes"; + separator = "; "; + }; + musicbrainz = { + extra_tags = [ + "year" + "catalognum" + "label" + ]; + genres = "yes"; + }; + aunique = { + keys = "albumartist album"; + disambiguators = "albumtype year label catalognum albumdisambig releasegroupdisambig"; + bracket = "[]"; + }; + per_disc_numbering = "yes"; + fetchart = { + cautious = "yes"; + }; + albumtypes = { + types = [ + { ep = "EP"; } + { single = "Single"; } + { soundtrack = "OST"; } + { live = "Live"; } + { compilation = "Compilation"; } + { remix = "Remix"; } + ]; + ignore_va = "compilation"; + bracket = "[]"; + }; + lastgenre = { + auto = "yes"; + prefer_specific = "no"; + count = 3; + separator = "; "; + force = "yes"; + source = "album"; + fallback = "Unclassified"; + whitelist = "yes"; + }; + plex = { + host = "media-server"; + port = 32400; + token = "DpUEsDtn43fiMEyzsTZ3"; + }; + paths = { + default = "%the{$albumartist}%ifdef{artistdisambig,(\${artistdisambig})}/$album%aunique{}/%if{$multidisc,$disc-}$track - $title"; + comp = "Various Artists/$album%aunique{}/$album%aunique{}/%if{$multidisc,$disc-}$track - $title"; + }; + importadded = { + preserve_mtimes = "yes"; + preserve_write_mtimes = "yes"; + }; + ui = { + color = "yes"; + }; + album_fields = { + format = ''formatList = [] +for item in items: + formatList.append(item.format) +return formatList +''; + }; + }; + }; - xdg.configFile."beets/config.yaml".source = ./beets/config.yaml; } diff --git a/modules/home/beets/config.yaml b/modules/home/beets/config.yaml index 4ed09d4..dbf3eb6 100644 --- a/modules/home/beets/config.yaml +++ b/modules/home/beets/config.yaml @@ -14,7 +14,7 @@ import: none_rec_action: asis duplicate_action: merge default_action: asis -plugins: fish discogs the duplicates embedart fetchart mbsync missing unimported inline lastgenre albumtypes ftintitle plexupdate importadded edit info +plugins: fish discogs the duplicates embedart fetchart mbsync missing unimported inline lastgenre albumtypes ftintitle plexupdate importadded edit info mpdupdate match: ignored_media: ['Data CD', 'DVD', 'DVD-Video', 'Blu-ray', 'HD-DVD', 'VCD', 'SVCD', 'UMD', 'VHS'] diff --git a/modules/home/shell-conf.nix b/modules/home/shell-conf.nix index ed0f64b..ae3b60d 100644 --- a/modules/home/shell-conf.nix +++ b/modules/home/shell-conf.nix @@ -44,7 +44,7 @@ pkg-config numbat - + nix-converter nurl fastfetch nvd